English | 中文
OpenAI Docs API Reference: https://platform.openai.com/docs/api-reference/introduction
# clone the project
git clone https://github.com/hanyuancheung/gpt-go.git
# go to the project directory
cd gpt-go
# set API_KEY as environment variable
export API_KEY={YOUR_API_KEY} chatgpt
# go build example binary
make chatgpt-example
# run example
./chatgpt
https://platform.openai.com/account/api-keys
Check out the go docs for more detailed documentation on the types and methods provided: https://pkg.go.dev/github.com/hanyuancheung/gpt-go
- List Engines API
- Get Engine API
- Completion API (this is the main gpt-3 API)
- Streaming support for the Completion API
- Document Search API
- Overriding default url, user-agent, timeout, and other options
Please open up an issue on GitHub before you put a lot of efforts on pull request.
The code submitting to PR must be filtered with gofmt
.
This package is licensed under MIT license. See LICENSE for details.
Give a ⭐️ if this project helped you!