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] Unable to engage in more than two rounds of conversation with Deepseeker R1 #5620

Closed
junity233 opened this issue Jan 29, 2025 · 5 comments · Fixed by #5601
Closed

[Bug] Unable to engage in more than two rounds of conversation with Deepseeker R1 #5620

junity233 opened this issue Jan 29, 2025 · 5 comments · Fixed by #5601
Labels
🐛 Bug Something isn't working | 缺陷 released

Comments

@junity233
Copy link

📦 Environment

Docker

📌 Version

v1.49.5

💻 Operating System

Windows

🌐 Browser

Chrome

🐛 Bug Description

When there are more than one message, using deepseek-r1 will report the following error:

{
"error": {
"code": "invalid_request_error",
"type": "invalid_request_error",
"param": null,
"message": "The first message (except the system message) of deepseek-reasoner must be a user message, but an assistant message detected."
},
"endpoint": "https://api.deepseek.com/v1",
"provider": "deepseek"
}

📷 Recurrence Steps

Sending more than two messages

🚦 Expected Behavior

Reply normally

📝 Additional Information

No response

@junity233 junity233 added the 🐛 Bug Something isn't working | 缺陷 label Jan 29, 2025
@github-project-automation github-project-automation bot moved this to Roadmap - Chat 1.x in Lobe Chat Routine Jan 29, 2025
@lobehubbot
Copy link
Member

👀 @junity233

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。我们会尽快调查此事,并尽快回复您。 请确保您已经提供了尽可能多的背景信息。

Copy link

dosubot bot commented Jan 29, 2025

Hey @junity233! 👋 I'm here to help you with any bugs, questions, or contributions you have. Let's squash this bug together!

The error you're encountering with Deepseeker R1 is due to the requirement that the first message, after any system message, must be a user message. The error message indicates that an assistant message was detected instead. This suggests that the message sequence is not being correctly managed, leading to an invalid request.

To resolve this issue, ensure that the message sequence starts with a user message after any system message. You might need to adjust the logic in your application to enforce this sequence, especially when handling multiple rounds of conversation. This could involve checking the role of the first message in each conversation round and ensuring it is set to 'user' before sending it to Deepseeker R1.

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other

@junity233
Copy link
Author

junity233 commented Jan 29, 2025

Here is a picture:

img

@lobehubbot
Copy link
Member

@junity233

This issue is closed, If you have any questions, you can comment and reply.
此问题已经关闭。如果您有任何问题,可以留言并回复。

@lobehubbot
Copy link
Member

🎉 This issue has been resolved in version 1.49.7 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug Something isn't working | 缺陷 released
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants