ChatGPT API Proxy

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": "我爱你,翻译成英语"}]
}'
作者:Jeebiz  创建时间:2023-04-09 23:04
最后编辑:Jeebiz  更新时间:2023-12-28 16:43