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] Anthropic API 反馈invalid_request_error 🐛 Bug #1765

Closed
JZ86 opened this issue Mar 27, 2024 · 7 comments · Fixed by #2439
Closed

[Bug] Anthropic API 反馈invalid_request_error 🐛 Bug #1765

JZ86 opened this issue Mar 27, 2024 · 7 comments · Fixed by #2439
Labels
🐛 Bug Something isn't working | 缺陷 released

Comments

@JZ86
Copy link

JZ86 commented Mar 27, 2024

💻 Operating System

Windows

📦 Environment

Official Preview

🌐 Browser

Chrome

🐛 Bug Description

今天突然反馈此问题,切换模型和角色无法解决。Anthropic API测试没问题
{
"error": {
"status": 400,
"headers": {
"connection": "keep-alive",
"content-length": "184",
"content-type": "application/json",
"date": "Wed, 27 Mar 2024 12:08:58 GMT",
"request-id": "req_0154YLAibXPbELPQvh5G2J8C",
"via": "1.1 google",
"x-cloud-trace-context": "691f3559ace780d47541f113d73afd8a",
"x-should-retry": "false"
},
"error": {
"type": "error",
"error": {
"type": "invalid_request_error",
"message": "messages: roles must alternate between "user" and "assistant", but found multiple "assistant" roles in a row"
}
}
},
"endpoint": "https://api.anthropic.com",
"provider": "anthropic"
}

🚦 Expected Behavior

No response

📷 Recurrence Steps

No response

📝 Additional Information

No response

@JZ86 JZ86 added the 🐛 Bug Something isn't working | 缺陷 label Mar 27, 2024
@lobehubbot
Copy link
Member

👀 @JZ86

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

@BrandonStudio
Copy link
Contributor

我看已经好多人说有这个问题了

你确定聊天界面是一条用户消息一条助手消息吗?

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


I see a lot of people have said they have this problem.

Are you sure the chat interface is one user message and one assistant message?

@JZ86
Copy link
Author

JZ86 commented Mar 29, 2024

我看已经好多人说有这个问题了

你确定聊天界面是一条用户消息一条助手消息吗?

上一秒还在回答,突然就返回error,然后就再也不work。只能在“默认话题”(临时)开启新的聊天,without history chat

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


I see that many people have said that they have this problem.

Are you sure the chat interface is one user message and one assistant message?

It was still answering a second ago, but suddenly an error was returned, and then it never worked again. New chats can only be opened in the "default topic" (temporary) without history chat

@lobehubbot
Copy link
Member

@JZ86

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 0.156.0 🎉

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.

3 participants