lobe-chat
lobe-chat copied to clipboard
[Bug] 代理服务器地址填了聊天没任何反应
💻 Operating System
macOS
📦 Environment
Vercel / Zeabur / Sealos
🌐 Browser
Chrome
🐛 Bug Description
在next-chat中使用的也是一样的代理地址和key,可以使用,这里填了就是不行,接口200,返回内容是空的
🚦 Expected Behavior
在next-chat中使用的也是一样的代理地址和key,可以使用,这里填了就是不行,接口200,返回内容是空的
📷 Recurrence Steps
在next-chat中使用的也是一样的代理地址和key,可以使用,这里填了就是不行,接口200,返回内容是空的
📝 Additional Information
在next-chat中使用的也是一样的代理地址和key,可以使用,这里填了就是不行,接口200,返回内容是空的
👀 @irwinai
Thank you for raising an issue. We will investigate into the matter and get back to you as soon as possible.
Please make sure you have given us as much context as possible.
非常感谢您提交 issue。我们会尽快调查此事,并尽快回复您。 请确保您已经提供了尽可能多的背景信息。
确认是否 URL 包含了 /v1
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
Check if /v1
is included
确认是否 URL 包含了
/v1
确实。。为什么做这种设计,文档也没有说明。。。
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
Check if the URL contains
/v1
really. . Why this design was made is not explained in the document. . .
文档也没有说明。。。
文档里不是提了么?
为什么做这种设计
这个跟模型服务商有很大关系,比如 openai 的默认地址是 openai.com/v1
。如果你的代理上是转发了 v1 这个接口,那么你就直接填 proxy.com 就好了,不用填 /v1
。 但如果模型服务商是直接转发了 openai.com 域名,那你就要自己加上 /v1
这个 url。
为什么 ChatNextWeb 不用,而 LobeChat 需要?
ChatNextWeb 的做法是直接写死了请求路径,自己构造了http请求直接往这个url 打。
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web/blob/main/app/constant.ts#L79
它的问题就是如果后续 openai 升级了接口版本到了 V2 ,那这个模式就没法兼容了。
但我们在 LobeChat 里目前使用的是 OpenAI 官方 npm 包。他们的 baseURL 参数里可以指定版本,因此对长远来看的兼容性会更好。