NextChat icon indicating copy to clipboard operation
NextChat copied to clipboard

[Bug] 相同key在本项目会出现空回复,但是lobechat及其他项目正常回复

Open blackh1 opened this issue 11 months ago • 13 comments

Bug Description

使用相同的apikey,在本项目会出现空回复的情况

Steps to Reproduce

填入key和自定义的endpoint,然后进行提问 image 后端为自建的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日志 image

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

blackh1 avatar Mar 19 '24 10:03 blackh1

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.

Issues-translate-bot avatar Mar 19 '24 10:03 Issues-translate-bot

和 https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web/issues/3427#issuecomment-1853959695 相同 Hi, @Yidadaa 可以麻烦看看吗?

jiz4oh avatar Mar 19 '24 16:03 jiz4oh

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?

Issues-translate-bot avatar Mar 19 '24 16:03 Issues-translate-bot

#3427 (comment) 相同 Hi, @Yidadaa 可以麻烦看看吗?

尝试里面提到的方法,但仍无效

blackh1 avatar Mar 20 '24 03:03 blackh1

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

Issues-translate-bot avatar Mar 20 '24 03:03 Issues-translate-bot

@blackh1 could you share the original request & response via the chrome dev tools?

fred-bf avatar Mar 20 '24 05:03 fred-bf

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 avatar Mar 21 '24 02:03 blackh1

@blackh1 I mean the request error/log when the stream message is disconnected, this is very helpful for initially determining the root casue

fred-bf avatar Mar 21 '24 10:03 fred-bf

遇到和他一样的情况。 01 Uploading 02.jpg…

frankpei1984 avatar Mar 22 '24 07:03 frankpei1984

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


Encountered the same situation as him. 01 Uploading 02.jpg…

Issues-translate-bot avatar Mar 22 '24 07:03 Issues-translate-bot

image 这是因为什么报错?

Xiao-yux avatar Mar 22 '24 12:03 Xiao-yux

image 我也一样

chengtx809 avatar Mar 28 '24 04:03 chengtx809

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


image me too

Issues-translate-bot avatar Mar 28 '24 04:03 Issues-translate-bot