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] fix message error #4621

Closed
2 of 3 tasks
QAbot-zh opened this issue May 6, 2024 · 5 comments
Closed
2 of 3 tasks

[Bug] fix message error #4621

QAbot-zh opened this issue May 6, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@QAbot-zh
Copy link

QAbot-zh commented May 6, 2024

Bug Description

仍然是之前的问题,可能之前没有表述清楚,实际上该issue涉及的问题还没有完全解决就被关掉了。再次表述问题,希望该问题得到关注。
#4443 (comment)

由于claude模型对于消息队列中第一条消息的role有严格的限制( https://docs.anthropic.com/claude/reference/messages_post ),而nextchat在根据“附带历史消息数”和“单次最大恢复限制”来处理历史消息时,没有针对性处理,导致很容易发生第一条消息的role是“assistant”(因为提问的“user”消息从消息队列里被弹出了)
image

nextchat 对历史消息进行处理,产生的不被claude接受的“错误”消息:
image

无法得到正确的响应:
image

Steps to Reproduce

调低单次最大回复、增加附带历史消息数、进行容易引发长回复的提问,就很容易触发该现象

Expected Behavior

消息队列保持第一条消息的角色为system或user,禁止出现首条消息的角色为 assistant

Screenshots

No response

Deployment Method

  • Docker
  • Vercel
  • Server

Desktop OS

No response

Desktop Browser

No response

Desktop Browser Version

No response

Smartphone Device

No response

Smartphone OS

No response

Smartphone Browser

No response

Smartphone Browser Version

No response

Additional Logs

No response

@QAbot-zh QAbot-zh added the bug Something isn't working label May 6, 2024
@Dean-YZG
Copy link
Contributor

Dean-YZG commented May 6, 2024

非常感谢反馈,会尽快处理

@Issues-translate-bot
Copy link

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


Thank you very much for the feedback, we will deal with it as soon as possible

@Dean-YZG
Copy link
Contributor

Dean-YZG commented May 6, 2024

已修复 #4625

@Dean-YZG Dean-YZG closed this as completed May 6, 2024
@Issues-translate-bot
Copy link

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


Fixed #4625

@QAbot-zh
Copy link
Author

QAbot-zh commented May 6, 2024

Thanks !

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

3 participants