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] 使用百度文心模型,并且指定角色时,会出现一个报错 #5140

Open
sky121666 opened this issue Dec 22, 2024 · 2 comments
Labels
🐛 Bug Something isn't working | 缺陷

Comments

@sky121666
Copy link

📦 部署环境

Docker

📌 软件版本

最新版

💻 系统环境

Ubuntu

🌐 浏览器

Edge

🐛 问题描述

遇到的问题:
在使用百度文心模型的时候,并且指定角色时,会报错,在随便聊聊中士正常的
image

在随便聊聊中的截图
image
在角色设定中的截图
image

报错:
{ "error": { "id": "as-p8ce5d12zj", "headers": { "p3p": "CP=\" OTI DSP COR IVA OUR IND COM \"", "date": "Sun, 22 Dec 2024 23:47:42 GMT", "appid": "116143465", "server": "Apache", "connection": "keep-alive", "set-cookie": "BAIDUID=5F5912788EAE7604720B81144C4948AE:FG=1; expires=Thu, 31-Dec-37 23:55:55 GMT; max-age=2145916555; path=/; domain=.baidubce.com; version=1", "content-type": "application/json; charset=utf-8", "content-length": "108", "x-aipe-self-def": "eb_total_tokens:0,prompt_tokens:0,id:as-p8ce5d12zj", "x-baidu-request-id": "c1047a4c6ec780c33ff53e48cf9613c01000324", "x-openapi-server-timestamp": "1734911262", "access-control-allow-origin": "*", "access-control-allow-headers": "Content-Type" }, "error_msg": "the role of first message must be user or assistant", "error_code": 336006 }, "provider": "wenxin" }

📷 复现步骤

No response

🚦 期望结果

No response

📝 补充信息

No response

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

👀 @sky121666

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 Dec 22, 2024

@sky121666 你好!我是Dosu,一个可以帮助您解决错误、回答问题并成为贡献者的机器人。我会在等待人类维护者的过程中帮助您。

The error message you're encountering indicates that the role of the first message must be either "user" or "assistant" when using the Wenxin model. This error is identified by the error code 336006. It seems that when you specify a role, the system is not correctly assigning the required role to the first message, leading to this error.

To resolve this issue, you should ensure that the first message in your interaction with the Wenxin model is explicitly set with the role "user" or "assistant". This might involve checking the part of your code where the initial message is constructed and ensuring that the role is correctly assigned.

Unfortunately, I couldn't find specific details in the codebase about how role assignment is handled for the Wenxin model, so you might need to look into the relevant parts of the code where the message roles are set or consult any available documentation or comments in the codebase that might provide further guidance.

To continue talking to Dosu, mention @dosu.


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

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
Status: Roadmap - Chat 1.x
Development

No branches or pull requests

2 participants