- Experimental support for Bing's version of ChatGPT, powered by GPT-4.
- Support for the official ChatGPT raw model,
text-chat-davinci-002, via OpenAI's API. - Includes an API server (with Docker support) you can run to use ChatGPT in non-Node.js applications.
- Includes a
ChatGPTClientandBingAIClientclass that you can use in your own Node.js applications. - Includes a CLI interface where you can chat with ChatGPT.
- (
ChatGPTClient) Replicates chat threads from the official ChatGPT website (with conversation IDs and message IDs), with persistent conversations using Keyv.- Conversations are stored in memory by default, but you can optionally install a storage adapter to persist conversations to a database.
- The
keyv-fileadapter is also included in this package, and can be used to store conversations in a JSON file if you're using the API server or CLI (seesettings.example.js).
- (
ChatGPTClient) Supports configurable prompt prefixes, and custom names for the user and ChatGPT.- In essence, this allows you to turn ChatGPT into a different character.
- This is currently only configurable on a global level, but I plan to add support for per-conversation customization.
- Node.js >= 16.0.0
- npm
- Docker (optional, for API server)
- OpenAI API key
Follow the same setup instructions for the API server, creating settings.js.
If installed globally:
chatgpt-cliIf installed locally:
npm run cliChatGPT's responses are automatically copied to your clipboard, so you can paste them into other applications.
If you'd like to contribute to this project, please create a pull request with a detailed description of your changes.
