NextChat
NextChat copied to clipboard
[Bug] 相同key在本项目会出现空回复,但是lobechat及其他项目正常回复
Bug Description
使用相同的apikey,在本项目会出现空回复的情况
Steps to Reproduce
填入key和自定义的endpoint,然后进行提问
后端为自建的oneapi,模型是将gpt-3.5映射到abab5.5-chat,就会出现这个问题。
Expected Behavior
正常回复
Screenshots
oneapi日志
record consume log: userId=2, channelId=34, promptTokens=402, completionTokens=0, modelName=abab5.5-chat, tokenName=chat
vercel日志
Deployment Method
- [ ] Docker
- [X] Vercel
- [ ] Server
Desktop OS
No response
Desktop Browser
Chrome
Desktop Browser Version
122.0
Smartphone Device
No response
Smartphone OS
No response
Smartphone Browser
No response
Smartphone Browser Version
No response
Additional Logs
No response
Bot detected the issue body's language is not English, translate it automatically.
Title: [Bug] There will be a null reply for the same key in this project, but lobechat and other projects will reply normally.
和 https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web/issues/3427#issuecomment-1853959695 相同 Hi, @Yidadaa 可以麻烦看看吗?
Bot detected the issue body's language is not English, translate it automatically.
Same as https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web/issues/3427#issuecomment-1853959695 Hi, @Yidadaa, could you please take a look?
Bot detected the issue body's language is not English, translate it automatically.
Same as #3427 (comment) Hi, @Yidadaa, can you please take a look?
Tried the methods mentioned there, but still doesn't work
@blackh1 could you share the original request & response via the chrome dev tools?
curl 'https://******/api/openai/v1/chat/completions'
-H 'authority: **'
-H 'accept: application/json, text/event-stream'
-H 'accept-language: zh-CN,zh;q=0.9,en;q=0.8'
-H 'authorization: Bearer '
-H 'content-type: application/json'
-H 'origin: https://'
-H 'referer: https:///'
-H 'sec-ch-ua: "Chromium";v="122", "Not(A:Brand";v="24", "Google Chrome";v="122"'
-H 'sec-ch-ua-mobile: ?0'
-H 'sec-ch-ua-platform: "Windows"'
-H 'sec-fetch-dest: empty'
-H 'sec-fetch-mode: cors'
-H 'sec-fetch-site: same-origin'
-H 'user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36'
--data-raw '{"messages":[{"role":"system","content":"\nYou are ChatGPT, a large language model trained by OpenAI.\nKnowledge cutoff: 2021-09\nCurrent model: gpt-3.5-turbo\nCurrent time: 2024/3/21 10:25:58\nLatex inline: $x^2$ \nLatex block: $$e=mc^2$$\n\n"},{"role":"system","content":"这是历史聊天总结作为前情提要:在前面的对话中,用户提出了两个问题。首先,用户要求编写C++代码,在堆上使用new
方法申请一个很大的二维数组。然后,用户要求编写在HLS上的C代码,使用malloc
方法申请一个很大的二维数组。\n \n 为了满足用户的需求,助手分别提供了C++和C代码示例。在C++代码示例中,使用new
关键字动态分配二维数组,并使用delete[]
释放内存。在C代码示例中,使用malloc
函数动态分配二维数组,并使用free
函数释放内存。\n \n 这些示例代码可以帮助用户理解如何在C++和HLS上动态分配和释放大型二维数组的内存。"},{"role":"user","content":"你好"},{"role":"assistant","content":"你好!有什么我可以帮助你的吗?"},{"role":"user","content":"你是"},{"role":"user","content":"你好"}],"stream":true,"model":"gpt-3.5-turbo","temperature":0.5,"presence_penalty":0,"frequency_penalty":0,"top_p":1}'
@blackh1 could you share the original request & response via the chrome dev tools?
@blackh1 I mean the request error/log when the stream message is disconnected, this is very helpful for initially determining the root casue
遇到和他一样的情况。
Bot detected the issue body's language is not English, translate it automatically.
Encountered the same situation as him.
这是因为什么报错?
我也一样
Bot detected the issue body's language is not English, translate it automatically.
me too