v4.7.0
版本发布时间: 2023-02-19 20:31:20
transitive-bullshit/agentic最新发布版本:7.0.0(2024-08-04 19:55:37)
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
- chore: update ts docs 42d163b
- 🥒 607fccf
- 🔻 df0d6ef
- 🛍 535d220
- 🌿 7c3a894
- feat: improve CLI and add to readme d9c307c
- fix: fix cli build => ts 1224e0c
- Merge pull request #363 from zeke/add-cli 5f7609c by @zeke 🔥
- Merge pull request #359 from linjungz/main b1f10a6
- add a CLI 30f3abd
- Update readme.md 2b1fafa
https://github.com/transitive-bullshit/chatgpt-api/compare/v4.6.0...v4.7.0