tian-minghui / openai-style-api

支持将openai、claude、azure openai, gemini,kimi, 智谱AI,通义千问,讯飞星火API等模型服务方的调用转为openai方式调用。屏蔽不同大模型API的差异,统一用openai api标准格式使用大模型(Shield the differences between different large model APIs and use large models in a unified openai API standard format)
MIT License
328 stars 55 forks source link

请教下如何配置ChatGPT-Next-Web #31

Closed ciothepul closed 2 months ago

ciothepul commented 2 months ago

在同一服务器上启动了openai-style-apiChatGPT-Next-Web,openai-style-api没有问题,可以单独正常使用,但是到了ChatGPT-Next-Web上就一直报连接错误,原因是什么呢 image

docker-compose配置如下

version: '3'

services:
  chatgpt-web:
    image: yidadaa/chatgpt-next-web
    ports:
      - 3000:3000
    environment:
      OPENAI_API_KEY: 7c7aa4a3549f12
      BASE_URL: http://azure-openai:8080
      CODE: ""
      HIDE_USER_API_KEY: 1
      HIDE_BALANCE_QUERY: 1
    depends_on:
      - azure-openai
    links:
      - azure-openai
    networks:
      - chatgpt-ns

  azure-openai:
    image: tianminghui/openai-style-api
    ports:
      - 8080:8080
    environment:
      - ADMIN-TOKEN=admin
    volumes:
      - ./model-config.json:/app/model-config.json
    networks:
      - chatgpt-ns

networks:
  chatgpt-ns:
    driver: bridge
tian-minghui commented 2 months ago

这个错误提示不是这个项目返回的错误信息,看样子是ChatGPT-Next-Web的处理,感觉是网络配置的有问题

ciothepul commented 2 months ago

确实是chatGPT-next-Web上的配置错了,修改了目前可以正常使用了