Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mirrors2/chatgpt-api-proxy
chatgpt api proxy
https://github.com/mirrors2/chatgpt-api-proxy
Last synced: 14 days ago
JSON representation
chatgpt api proxy
- Host: GitHub
- URL: https://github.com/mirrors2/chatgpt-api-proxy
- Owner: mirrors2
- License: mit
- Created: 2023-03-18T12:36:16.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-05-14T08:58:09.000Z (over 1 year ago)
- Last Synced: 2024-08-01T08:13:42.935Z (3 months ago)
- Language: Go
- Homepage: https://chatgpt.mirrors2.eu.org
- Size: 29.3 KB
- Stars: 14
- Watchers: 2
- Forks: 9
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# chatgpt-api-proxy
# (后续没有新功能,推荐使用[opencatd-open](https://github.com/mirrors2/opencatd-open))
chatgpt api 代理,已验证OpenCat,AssisChat,AMA(问天),chathub
可配置好OPENAI_API_KEY分享代理地址给他人用.
## 快速开始
```
docker run -d -p 80:80 --name chatgpt-api-proxy mirrors2/chatgpt-api-proxy可选 -e OPENAI_API_KEY={nide_api_key}
```## docker-compose
```
version: '3.7'
services:
chatgpt-api-proxy:
image: mirrors2/chatgpt-api-proxy
container_name: chatgpt-api-proxy
restart: unless-stopped
ports:
- 80:80
# environment:
# 自定义apikey,可分享给别人用
# - OPENAI_API_KEY={openai_api_key}```
or```
wget https://github.com/mirrors2/chatgpt-api-proxy/raw/main/docker/docker-compose.yml
```
# 测试
```
curl https://chatgpt.gopher.ink/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $OPENAI_API_KEY" \
-d '{
"model": "gpt-3.5-turbo",
"messages": [{"role": "user", "content": "我爱你,翻译成英语"}]
}'
```# License
[MIT](./LICENSE) License.