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]The first message (except the system message) of deepseek-reasoner must be a user message, but an assistant message detected. #6305

Closed
YiJieLiuHub opened this issue Feb 27, 2025 · 13 comments · Fixed by #6311
Labels
bug Something isn't working

Comments

@YiJieLiuHub
Copy link

📦 Deployment Method

Docker

📌 Version

V2.15.8

💻 Operating System

Ubuntu

📌 System Version

Ubuntu 24.04.1 LTS

🌐 Browser

Chrome

📌 Browser Version

133.0.6943.128(正式版本)

🐛 Bug Description

对接了DeepSeek官方API的时候,聊几句就会出现如下如图问题,问题描述:The first message (except the system message) of deepseek-reasoner must be a user message, but an assistant message detected.

Image
我估计是因为历史消息的原因:

Image

📷 Recurrence Steps

设置中,历史消息设置为4,多轮对话下来,当你问第3个问题的时候,就会出现上述问题,但是如果我清除聊天,又可以继续聊了,所以我认为就是历史消息的缘故。

🚦 Expected Behavior

不确定这是不是DeepSeek官方API的问题,还是C端的问题,期望的是我能够一直提问和回答下去

📝 Additional Information

No response

@YiJieLiuHub YiJieLiuHub added the bug Something isn't working label Feb 27, 2025
@YiJieLiuHub YiJieLiuHub changed the title [Bug] [Bug]The first message (except the system message) of deepseek-reasoner must be a user message, but an assistant message detected. Feb 27, 2025
@amlkiller
Copy link

nextchat用R1 前端没有遵循ds官方最佳实践,建议换用其他的如openwebui用社区的函数或者过滤器。

@QAbot-zh
Copy link

这也是历史遗留问题了,本来应该按轮次来控制消息的,而不应该按消息数,按轮次可以减少很多潜在的问题: #4443

@Issues-translate-bot
Copy link

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


This is also a historical problem. The messages should have been controlled by rounds, rather than by the number of messages. By rounds, many potential problems can be reduced: #4443

@QAbot-zh
Copy link

nextchat用R1 前端没有遵循ds官方最佳实践,建议换用其他的如openwebui用社区的函数或者过滤器。

可以试试我的二开版 😀

@Issues-translate-bot
Copy link

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


Nextchat's R1 front end does not follow the official best practices of ds. It is recommended to use other functions or filters such as openwebui. ![](https://camo.githubusercontent.com/372745985059a673146ef6a625eaa6ccf9fe158e6a7e7c29c27470698db239bb/68747470733a2f2f63646e2d75706c6f6164732e68756767696e 67666163652e636f2f70726f64756374696f6e2f75706c6f6164732f3635303736326430656163343565653265343230613338622f3043774d64624466665a514a7a5f2d575a726877482e706e67)

You can try my second edition 😀

@Lingrui98
Copy link

nextchat用R1 前端没有遵循ds官方最佳实践,建议换用其他的如openwebui用社区的函数或者过滤器。

可以试试我的二开版 😀

您好,我也遇到这个问题了,您的二次开发版本是指您主页上的那个fork吗?它和主线分岔太多,不知能否给一个或者几个具体的解决这个问题的commit?

@Issues-translate-bot
Copy link

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


Nextchat's R1 front end does not follow the official best practices of ds. It is recommended to use other functions or filters such as openwebui community. ![](https://camo.githubusercontent.com/372745985059a673146ef6a625eaa6ccf9fe158e6a7e7c29c27470698db239bb/68747470733a2f2f63646e2d75706c6f6164732e68756767696e 67666163652e636f2f70726f64756374696f6e2f75706c6f6164732f3635303736326430656163343565653265343230613338622f3043774d64624466665a514a7a5f2d575a726877482e706e67)

You can try my second edition 😀

Hello, I also encountered this problem. Does your secondary development version refer to the fork on your homepage? It has too many bifurcations with the main line. I wonder if I can give one or several commits to solve this problem?

@Hi-NMY
Copy link

Hi-NMY commented Feb 28, 2025

我也遇到这个问题喽.....不知官方能不能修复嘞..emmmmm

@Issues-translate-bot
Copy link

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


I'm also facing this problem... I don't know if it can be fixed by the official...

@QAbot-zh
Copy link

QAbot-zh commented Feb 28, 2025

您好,我也遇到这个问题了,您的二次开发版本是指您主页上的那个fork吗?它和主线分岔太多,不知能否给一个或者几个具体的解决这个问题的commit?

@Lingrui98 是楼主说的 assistant 消息问题还是楼里说的思维链拼接问题,如您所说,因为分岔较早代码差异大,所以很难说哪些 commit 对官方当前版本是起作用的,我可以给你具体的修改建议

@Issues-translate-bot
Copy link

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


Hello, I also encountered this problem. Does your secondary development version refer to the fork on your homepage? It has too many bifurcations with the main line. I wonder if I can give one or several commits to solve this problem?

Is it the assistant message problem mentioned by the poster or the thinking chain splicing problem mentioned by the poster? As you said, because the codes for bifurcation are very different from each other, it is difficult to say which commits work for the current official version. I can give you specific modification suggestions

@Lingrui98
Copy link

是楼主说的 assistant 消息问题还是楼里说的思维链拼接问题,如您所说,因为分岔较早代码差异大,所以很难说哪些 commit 对官方当前版本是起作用的,我可以给你具体的修改建议

感谢您的回复!目前merge最新的pr以后问题已经解决了 : )

@Issues-translate-bot
Copy link

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


Is it the assistant message problem mentioned by the poster or the thinking chain splicing problem mentioned by the poster? As you said, because the codes of the fork are very different from each other earlier, it is difficult to say which commits work for the current official version. I can give you specific modification suggestions

Thank you for your reply! Currently, the latest PR problem in merge has been solved : )

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

Successfully merging a pull request may close this issue.

6 participants