Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/u2takey/chatgpt-go
golang version chatgpt api sdk and service
https://github.com/u2takey/chatgpt-go
chatgpt go golang
Last synced: 16 days ago
JSON representation
golang version chatgpt api sdk and service
- Host: GitHub
- URL: https://github.com/u2takey/chatgpt-go
- Owner: u2takey
- License: gpl-3.0
- Created: 2023-02-26T07:03:15.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-02-27T13:28:27.000Z (over 1 year ago)
- Last Synced: 2024-10-04T13:30:07.144Z (about 1 month ago)
- Topics: chatgpt, go, golang
- Language: Go
- Homepage:
- Size: 34.2 KB
- Stars: 20
- Watchers: 2
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# chatgpt-go
golang version for chatgpt api.Just a golang port for [acheong08/ChatGPT(v1-standard-chatgpt)](https://github.com/acheong08/ChatGPT)
Refer to [test](./chatgpt_test.go) for usage.
## chatgpt-service
serve chatgpt-api as http service
```sh
>> make docker
>> docker run -p 8088:8088 chat-service>> curl localhost:8088/bind -d '{"user_id": "test", "access_token": "xxx"}'
{"code":200,"message":""}%>>> curl localhost:8088/ask -d '{"user_id": "test", "prompt": "什么是快乐星球"}'
{"code":0,"message":"","data":{"message":"xxxxx","conversation_id":"6309e31b-ab58-42ae-8af5-f9cda3881bf8","parent_id":"ab0ff560-2140-4333-975d-8b147728cc0f","model":""}}%
```