mirror of
https://github.com/langgenius/dify-official-plugins.git
synced 2026-07-22 01:55:27 -04:00
Version 1.2.0 encounters an error when using the multimodal model glm-4v-flash to recognize uploaded images, while the same configuration works fine in version 0.15.3. #197
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @5lei on GitHub (Apr 15, 2025).
Self Checks
Dify version
1.2.0
Cloud or Self Hosted
Self Hosted (Docker)
Steps to reproduce
Operation Steps:
Configure a picture upload at the start node. At the second node, enable the mass spectrometry vision model glm-4v-flash, and an error occurs when identifying the picture content.
Error Information
[zhipuai] Error: PluginInvokeError: {"args":{},"error_type":"ValidationError","message":"1 validation error for ModelInvokeLLMRequest\nprompt_messages.content.type\n Input should be <PromptMessageContentType.TEXT: 'text'> [type=literal_error, input_value='text', input_type=str]\n For further information visit https://errors.pydantic.dev/2.8/v/literal_error"}
Problem Description
The same configuration works normally in dify 0.15.3, but an error occurs after upgrading to 1.2.0. Please help check what the problem is. Thank you.
✔️ Expected Behavior
No response
❌ Actual Behavior
No response
@dosubot[bot] commented on GitHub (Apr 15, 2025):
Hello @5lei! I'm Dosu, a bot here to help you with bugs, answer questions, and assist you in becoming a contributor. I'm ready to help while you wait for a human maintainer. Let's dive into your issue together!
The ValidationError you're encountering with the glm-4v-flash model in version 1.2.0 is due to Zhipu not supporting system role messages. To resolve this issue, you need to move all prompts from the 'system' role to the 'user' role. This change is necessary because the handling of role messages has been updated in version 1.2.0, which differs from version 0.15.3 where this was not enforced [1].
To continue talking to Dosu, mention @dosu.
Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other
@5lei commented on GitHub (Apr 15, 2025):
I tried switching back to the user role, and the error still persists. It seems that the issue isn’t related to the prompt. I suspect it has something to do with the parameter passing of the visual images. There is no error when the visual option is not selected. Could you please take another look at this problem? Thank you.
@dosubot[bot] commented on GitHub (Aug 17, 2025):
Hi, @5lei. I'm Dosu, and I'm helping the dify-official-plugins team manage their backlog and am marking this issue as stale.
Issue Summary:
Next Steps:
Thank you for your understanding and contribution!