ChatGPTNextWeb / ChatGPT-Next-Web

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

[Bug] 配置BASE_URL后直接返回html代码 #4761

Open RogerProSelf opened 1 month ago

RogerProSelf commented 1 month ago

Bug Description

在配置自部署的One-API的自定义BASE_URL后(形式如https://xxx.xxx.xxx:1234,非自签名SSL证书,端口外网访问正常),聊天界面直接返回HTML代码。

疑似是服务端侧访问导致的问题,因为在web ui中使用完全一样的自定义接口地址而不用默认的“api/openai”后就可以正常使用了。我看了之前别人的issue,似乎有提到在使用“api/openai”时是服务端侧访问,而自定义web ui中的接口地址时是客户端侧访问。

Screenshots

截屏2024-05-22 02 45 11

Deployment Method

Issues-translate-bot commented 1 month ago

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


Title: [Bug] Return html code directly after configuring BASE_URL

Dean-YZG commented 1 month ago

do you have screenshot about the error request in browser dev tool?

Dean-YZG commented 1 month ago

the cause of reponsing html page is the path is not exsit on finally target server deployed, please check your env vars, the splicing rule of a forward url is 'BASE_URL/v1/chat/completions'