AI agent stdlib that works with any LLM and TypeScript AI SDK.
MIT License
Bot releases are visible (Hide)
Published by transitive-bullshit over 1 year ago
The official OpenAI chat completions API has been released, and it is now the default for this package! ๐ฅ
Method | Free? | Robust? | Quality? |
---|---|---|---|
ChatGPTAPI |
โ No | โ Yes | โ ๏ธ Real ChatGPT models |
ChatGPTUnofficialProxyAPI |
โ Yes | โ๏ธ Maybe | โ Real ChatGPT |
Note: We strongly recommend using ChatGPTAPI
since it uses the officially supported API from OpenAI. We may remove support for ChatGPTUnofficialProxyAPI
in a future release.
ChatGPTAPI
- Uses the gpt-3.5-turbo-0301
model with the official OpenAI chat completions API (official, robust approach, but it's not free)ChatGPTUnofficialProxyAPI
- Uses an unofficial proxy server to access ChatGPT's backend API in a way that circumvents Cloudflare (uses the real ChatGPT and is pretty lightweight, but relies on a third-party server and is rate-limited)https://github.com/transitive-bullshit/chatgpt-api/compare/v4.8.3...v5.0.0
Published by transitive-bullshit over 1 year ago
https://github.com/transitive-bullshit/chatgpt-api/compare/v4.8.2...v4.8.3
Published by transitive-bullshit over 1 year ago
https://github.com/transitive-bullshit/chatgpt-api/compare/v4.8.1...v4.8.2
Published by transitive-bullshit over 1 year ago
https://github.com/transitive-bullshit/chatgpt-api/compare/v4.8.0...v4.8.1
Published by transitive-bullshit over 1 year ago
https://github.com/transitive-bullshit/chatgpt-api/compare/v4.7.2...v4.8.0
Published by transitive-bullshit over 1 year ago
https://github.com/transitive-bullshit/chatgpt-api/compare/v4.7.1...v4.7.2
Published by transitive-bullshit over 1 year ago
https://github.com/transitive-bullshit/chatgpt-api/compare/v4.7.0...v4.7.1
Published by transitive-bullshit over 1 year ago
This release adds CLI functionality to chatgpt
โย Huge props to @zeke for the great idea and initial PR ๐ฅ
To run the CLI, you'll need an OpenAI API key:
export OPENAI_API_KEY="sk-TODO"
npx chatgpt "your prompt here"
By default, the response is streamed to stdout, the results are stored in a local config file, and every invocation starts a new conversation. You can use -c
to continue the previous conversation and --no-stream
to disable streaming.
Under the hood, the CLI uses ChatGPTAPI
with text-davinci-003
to mimic ChatGPT.
Usage:
$ chatgpt <prompt>
Commands:
<prompt> Ask ChatGPT a question
rm-cache Clears the local message cache
ls-cache Prints the local message cache path
For more info, run any command with the `--help` flag:
$ chatgpt --help
$ chatgpt rm-cache --help
$ chatgpt ls-cache --help
Options:
-c, --continue Continue last conversation (default: false)
-d, --debug Enables debug logging (default: false)
-s, --stream Streams the response (default: true)
-s, --store Enables the local message cache (default: true)
-t, --timeout Timeout in milliseconds
-k, --apiKey OpenAI API key
-n, --conversationName Unique name for the conversation
-h, --help Display this message
-v, --version Display version number
https://github.com/transitive-bullshit/chatgpt-api/compare/v4.6.0...v4.7.0
Published by transitive-bullshit over 1 year ago
There should be no public changes with this release. It's just changing internals for hopefully better compatibility.
https://github.com/transitive-bullshit/chatgpt-api/compare/v4.5.1...v4.6.0
Published by transitive-bullshit over 1 year ago
https://github.com/transitive-bullshit/chatgpt-api/compare/v4.5.0...v4.5.1
Published by transitive-bullshit over 1 year ago
We now provide three ways of accessing the unofficial ChatGPT API, all of which have tradeoffs:
Method | Free? | Robust? | Quality? |
---|---|---|---|
ChatGPTAPI |
โ No | โ Yes | โ๏ธ Mimics ChatGPT |
ChatGPTUnofficialProxyAPI |
โ Yes | โ๏ธ Maybe | โ Real ChatGPT |
ChatGPAPIBrowser (v3) |
โ Yes | โ No | โ Real ChatGPT |
Note: I recommend that you use either ChatGPTAPI
or ChatGPTUnofficialProxyAPI
.
ChatGPTAPI
- Uses text-davinci-003
to mimic ChatGPT via the official OpenAI completions API (most robust approach, but it's not free and doesn't use a model fine-tuned for chat)ChatGPTUnofficialProxyAPI
- Uses an unofficial proxy server to access ChatGPT's backend API in a way that circumvents Cloudflare (uses the real ChatGPT and is pretty lightweight, but relies on a third-party server and is rate-limited)ChatGPTAPIBrowser
- (v3.5.1 of this package) Uses Puppeteer to access the official ChatGPT webapp (uses the real ChatGPT, but very flaky, heavyweight, and error prone)https://github.com/transitive-bullshit/chatgpt-api/compare/v4.4.1...v4.5.0
Published by transitive-bullshit over 1 year ago
https://github.com/transitive-bullshit/chatgpt-api/compare/v4.4.0...v4.4.1
Published by transitive-bullshit over 1 year ago
https://github.com/transitive-bullshit/chatgpt-api/compare/v4.3.3...v4.4.0
Published by transitive-bullshit over 1 year ago
https://github.com/transitive-bullshit/chatgpt-api/compare/v4.3.2...v4.3.3
Published by transitive-bullshit over 1 year ago
https://github.com/transitive-bullshit/chatgpt-api/compare/v4.3.1...v4.3.2
Published by transitive-bullshit over 1 year ago
See demos/demo-reverse-proxy.ts
for an example.
https://github.com/transitive-bullshit/chatgpt-api/commit/1777c4551db688ce7a681ecb33f259825bd44f6f
Published by transitive-bullshit over 1 year ago
https://github.com/transitive-bullshit/chatgpt-api/compare/v4.1.3...v4.2.0
Published by transitive-bullshit over 1 year ago
https://github.com/transitive-bullshit/chatgpt-api/compare/v4.1.2...v4.1.3
Published by transitive-bullshit over 1 year ago
https://github.com/transitive-bullshit/chatgpt-api/compare/v4.1.1...v4.1.2
Published by transitive-bullshit over 1 year ago
https://github.com/transitive-bullshit/chatgpt-api/compare/v4.1.0...v4.1.1