Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
1 of 3 tasks
blackh1 opened this issue Mar 19, 2024 · 14 comments
Closed
1 of 3 tasks
Labels
bug Something isn't working

Comments

@blackh1
Copy link

blackh1 commented Mar 19, 2024

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
  • 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 blackh1 added the bug Something isn't working label Mar 19, 2024
@Issues-translate-bot
Copy link

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.

@jiz4oh
Copy link

jiz4oh commented Mar 19, 2024

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

@Issues-translate-bot
Copy link

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


Same as #3427 (comment)
Hi, @Yidadaa, could you please take a look?

@blackh1
Copy link
Author

blackh1 commented Mar 20, 2024

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

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

@Issues-translate-bot
Copy link

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

@fred-bf
Copy link
Contributor

fred-bf commented Mar 20, 2024

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

@blackh1
Copy link
Author

blackh1 commented Mar 21, 2024

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?

@fred-bf
Copy link
Contributor

fred-bf commented Mar 21, 2024

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

@frankpei1984
Copy link

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

@Issues-translate-bot
Copy link

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


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

@Xiao-yux
Copy link

image
这是因为什么报错?

@chengtx809
Copy link

image
我也一样

@Issues-translate-bot
Copy link

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


image
me too

@lloydzhou
Copy link
Member

please see #5001

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

8 participants