npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

node-gpt-api

v1.0.2

Published

Typescript / Javascript client sdk to access GPT's AI-powered conversational functionality (without OpenAI API key nor VPN)

Downloads

17

Readme

node-gpt-api

Typescript / Javascript client sdk to access GPT's AI-powered conversational functionality (without OpenAI API key nor VPN).

npm Package Version

Details refer to https://github.com/beenotung/gpt-api

Remarks

The spirit of this library is to enable developers to use the Platform for Open Exploration (Poe) via API. It's designed to empower integration and application development within the terms of service of Poe, which specifically disallow any form of automation that exceeds the set rate limits. Please use this library responsibly and within the provided guidelines.

Features

  • Intuitive API: Make conversation with GPT models via simple and developer-friendly API.

  • Programming Language Agnostic: Designed to work with any programming language. Integrate GPT-powered conversational functionalities into your existing projects with ease.

  • Responsible Usage: Encourages users to respect the guidelines and rate limits set by Poe.

Installation

npm install node-gpt-api

You can also install with pnpm, yarn or slnpm.

Usage Examples

import { ask } from 'node-gpt-api'
import { writeFileSync } from 'fs'

async function main() {
  // ask GPT a question and wait for complete response
  let task = await ask('Can I call GPT API from Typescript?')
  console.log(task.text)
  writeFileSync(`task-${task.id}.html`, task.html)

  // ask GPT a question and process the partial response in realtime
  task = await ask('What can I do with GPT?', task => {
    console.clear()
    console.log(task.question)
    console.log('='.repeat(32))
    console.log(task.text)
  })
  console.log('text:', task.text.length, 'html:', task.html.length)
}
main()

Detail example can refer to the demo cli.ts

Proper Use

It's important to note that Poe's terms of service disallow any form of automation that exceeds the rate limits set forth by Poe. Please ensure to use this library responsibly and within the limits set by Poe. Improper use may lead to suspension of your access to the services.

Potential Use Cases

(This section is generated by GPT-4 itself)

GPT (Generative Pre-trained Transformer) models are powerful language models capable of generating human-like text. They can be used to enable a wide range of functionalities:

  • Chatbots and Conversational Agents: GPT models can be used to create chatbots that can carry on human-like conversations. These chatbots can answer questions, provide recommendations, and even have friendly chats with users.

  • Text Generation and Completion: Given a prompt, GPT models can generate coherent and contextually relevant text. This can be used for tasks such as writing essays, generating code, creating poetry, and much more.

  • Translation: While not specifically trained for translation, GPT models have shown reasonable performance in translating text between languages.

  • Summarization: GPT models can be used to summarize long pieces of text, providing a condensed version while preserving the original meaning.

  • Question Answering: Given a context and a question, GPT models can provide accurate answers, making them useful for tasks like customer support, tutoring, and knowledge extraction.

  • Sentiment Analysis: While not a primary use case, GPT models can be used to analyze the sentiment of a piece of text, identifying whether the sentiment is positive, negative, or neutral.

  • Content Moderation: GPT models can help moderate content, identifying inappropriate or offensive text.

  • Personal Assistants: GPT models can be used to create personal assistants that can schedule appointments, send messages, set reminders, and more.

  • Tutoring: GPT can provide detailed explanations on a wide range of topics, making it a useful tool for education and tutoring.

These applications can be integrated into various software applications, websites, and services to provide a more interactive and personalized user experience.

However, it's important to note that while GPT models are powerful, they are not perfect. They can sometimes generate incorrect or inappropriate responses, and should not be relied upon for critical decision-making without human supervision.

License

This project is licensed with BSD-2-Clause

This is free, libre, and open-source software. It comes down to four essential freedoms [ref]:

  • The freedom to run the program as you wish, for any purpose
  • The freedom to study how the program works, and change it so it does your computing as you wish
  • The freedom to redistribute copies so you can help others
  • The freedom to distribute copies of your modified versions to others