Skip to content
This repository has been archived by the owner on Aug 10, 2023. It is now read-only.

{"error":"error sending request"},Docker-Compose配置、反向代理均正常 #101

Open
ventusoon opened this issue Jul 30, 2023 · 0 comments

Comments

@ventusoon
Copy link

ventusoon commented Jul 30, 2023

Docker-Compose配置如下

version: '3'

services:
  app:
    image: acheong08/chatgpt-to-api
    container_name: chatgpttoapi
    restart: unless-stopped
    ports:
      - '8081:8081'
    environment:
      SERVER_HOST: 0.0.0.0
      SERVER_PORT: 8081
      ADMIN_PASSWORD: TotallySecurePassword
      API_REVERSE_PROXY: http://127.0.0.1:6789/chatgpt/backend-api/conversation
      PUID: user-oQxkKBxxxxxxxxxxRJ3Xq

以上反代地址,为linweiyuan/go-chatgpt-api项目搭建,正常使用。
接着,
按照使用文档配置,通过使用

curl http://127.0.0.1:8081/v1/chat/completions \
  -d '{
     "model": "text-davinci-002-render-sha",
     "messages": [{"role": "user", "content": "你是什么模型,是GPT3.5吗"}]
   }'

输出

{"error":"error sending request"}

无法获取APIkey,通过提交token依然显示如此

网页访问http://127.0.0.1:8081/v1/chat/completions,显示404

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant