ChatGPTNextWeb / ChatGPT-Next-Web

A cross-platform ChatGPT/Gemini UI (Web / PWA / Linux / Win / MacOS). 一键拥有你自己的跨平台 ChatGPT/Gemini 应用。
https://app.nextchat.dev/
MIT License
74.37k stars 58.7k forks source link

配置one api调用模型出错[Bug] #4633

Open vonandrew opened 3 months ago

vonandrew commented 3 months ago

Bug Description

oneapi 版本;v0.6.6-alpha.5 ChatGPT next web 版本:v2.11.3 使用Docker部署

在ChatGPT next web容器上配置环境变量BASE_URL和OPENAI_API_KEY,会报如下错误:

{ "cause": { "errno": -3007, "code": "ENOTFOUND", "syscall": "getaddrinfo", "hostname": "oneapi.myhost.com" } }

但直接在ChatGPT next web的用户设置中自定义接口里输入相同的接口地址和key可以成功调用。

Steps to Reproduce

Expected Behavior

修复

Screenshots

No response

Deployment Method

Desktop OS

No response

Desktop Browser

No response

Desktop Browser Version

No response

Smartphone Device

No response

Smartphone OS

No response

Smartphone Browser

No response

Smartphone Browser Version

No response

Additional Logs

No response

Issues-translate-bot commented 3 months ago

Bot detected the issue body's language is not English, translate it automatically.


Title: Error configuring one api calling model [Bug]

Dean-YZG commented 3 months ago

有浏览器 dev tools的network视图的接口报错截图么?

Issues-translate-bot commented 3 months ago

Bot detected the issue body's language is not English, translate it automatically.


Do you have a screenshot of the interface error in the network view of the browser dev tools?

vonandrew commented 3 months ago

有浏览器 dev tools的network视图的接口报错截图么? image

前一个是请求是在不填写“接口地址”和“API KEY”下发出的,后两个是填写了“接口地址”和“API KEY”后发出的。

在用户设置界面填写“接口地址”和“API KEY”后,无论是否勾选“自定义接口”,请求URL为 “https://oneapi.myhost.com/v1/chat/completions”。 如果把“接口地址”和“API KEY“两个选项清空后,无论是否勾选“自定义接口”,请求URL变成了:“https://chatgpt.myhost.com/api/openai/v1/chat/completions”。

[oneapi.myhost.com 是oneapi的托管主机,chatgpt.myhost.com是nextChat的托管主机]