Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

Awesome Lists containing this project

README

        

# chatgpt-api-proxy

GitHub Workflow Status

# (后续没有新功能,推荐使用[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.