You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{
"code": "completion_request_error",
"message": "[tongyi] Error: 2 validation errors for AssistantPromptMessage\ncontent.str\n Input should be a valid string [type=string_type, input_value=[{'text': '你好!我...的新篇章!😊'}], input_type=list]\n For further information visit https://errors.pydantic.dev/2.9/v/string_type\ncontent.json-or-python[json=list[PromptMessageContent],python=chain[is-instance[Sequence],function-wrap[sequence_validator()]]].0.type\n Field required [type=missing, input_value={'text': '你好!我们...活的新篇章!😊'}, input_type=dict]\n For further information visit https://errors.pydantic.dev/2.9/v/missing",
"status": 400
}
if set response_mode to "streaming", it can work,
The text was updated successfully, but these errors were encountered:
arzen
changed the title
/chat-messages AIP handle VL model input error
/chat-messages API handle VL model input error
Jan 23, 2025
The error message you're encountering indicates validation errors for the AssistantPromptMessage model. Specifically, it seems that the content field is expected to be a valid string, but a list is being provided instead. Additionally, a required field within the content is missing.
To resolve this, ensure that the content field in your request is a valid string and that all required fields are included. If switching to "streaming" mode works, it might be due to differences in how the modes handle input validation. You may need to adjust the input format or structure when using "blocking" mode to meet the validation requirements.
Self Checks
Dify version
0.15.0
Cloud or Self Hosted
Self Hosted (Docker)
Steps to reproduce
use qwen2.5 -VL model, set response_mode to "blocking" such as :
post call API /chat-messages
✔️ Expected Behavior
it can work well
❌ Actual Behavior
then respone error message:
if set response_mode to "streaming", it can work,
The text was updated successfully, but these errors were encountered: