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

🐛 fix: Multiple deepseek-reasoner errors #5548

Closed
wants to merge 5 commits into from

Conversation

sxjeru
Copy link
Contributor

@sxjeru sxjeru commented Jan 22, 2025

💻 变更类型 | Change Type

  • ✨ feat
  • 🐛 fix
  • ♻️ refactor
  • 💄 style
  • 👷 build
  • ⚡️ perf
  • 📝 docs
  • 🔨 chore

🔀 变更说明 | Description of Change

修复 deepseek-r1 的下述报错。当前采用直接剔除不合规消息的方案,应当有更合适的方案,比如通过添加一条空消息使其合规。

The first message (except the system message) of deepseek-reasoner must be a user message, 
but an assistant message detected.
deepseek-reasoner does not support successive user or assistant messages (messages[x] and messages[x] in your input). 
You should interleave the user/assistant messages in the message sequence.

📝 补充信息 | Additional Information

Copy link

vercel bot commented Jan 22, 2025

@sxjeru is attempting to deploy a commit to the LobeHub Team on Vercel.

A member of the Team first needs to authorize it.

@dosubot dosubot bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Jan 22, 2025
@lobehubbot
Copy link
Member

👍 @sxjeru

Thank you for raising your pull request and contributing to our Community
Please make sure you have followed our contributing guidelines. We will review it as soon as possible.
If you encounter any problems, please feel free to connect with us.
非常感谢您提出拉取请求并为我们的社区做出贡献,请确保您已经遵循了我们的贡献指南,我们会尽快审查它。
如果您遇到任何问题,请随时与我们联系。

@dosubot dosubot bot added the 🐛 Bug Something isn't working | 缺陷 label Jan 22, 2025
Copy link

codecov bot commented Jan 22, 2025

Codecov Report

Attention: Patch coverage is 77.27273% with 5 lines in your changes missing coverage. Please review.

Project coverage is 92.15%. Comparing base (979849c) to head (7c80d96).
Report is 38 commits behind head on main.

Files with missing lines Patch % Lines
src/libs/agent-runtime/deepseek/index.ts 77.27% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5548      +/-   ##
==========================================
- Coverage   92.15%   92.15%   -0.01%     
==========================================
  Files         640      640              
  Lines       56821    56840      +19     
  Branches     4238     2886    -1352     
==========================================
+ Hits        52365    52379      +14     
- Misses       4456     4461       +5     
Flag Coverage Δ
app 92.15% <77.27%> (-0.01%) ⬇️
server 97.99% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@sxjeru sxjeru changed the title 🐛 fix: The first message (except the system message) of deepseek-reasoner must be a user message 🐛 fix: Multiple deepseek-reasoner errors Jan 22, 2025
@sxjeru sxjeru closed this Jan 26, 2025
@sxjeru sxjeru deleted the patch-4 branch January 26, 2025 11:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug Something isn't working | 缺陷 size:S This PR changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants