dify icon indicating copy to clipboard operation
dify copied to clipboard

Bug:The issue with calling Zhipu AI is that in the chat assistant type, workflow orchestration is available, but errors occur when using the workflow type.

Open ixujue opened this issue 1 year ago • 3 comments

Self Checks

  • [X] This is only for bug report, if you would like to ask a quesion, please head to Discussions.
  • [X] I have searched for existing issues search for existing issues, including closed ones.
  • [X] I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [X] Pleas do not modify this template :) and fill in all the required fields.

Dify version

Version 0.6.3

Cloud or Self Hosted

Cloud

Steps to reproduce

The issue with the ZhiPu AI model arises when operating within the chat assistant type where workflow orchestration is functioning properly. However, errors are encountered when switching to the workflow type. Among the four available models, only one model operates correctly in the workflow type (chatglm_turbo). The other two models result in errors (glm-3-turbo, glm-4), and one model seems to be in a state of self-entertainment (glm-4v), consistently producing hallucinatory results. There are two specific error prompts that occur: "Node LLM run failed: [Zhipu] Error: Error code: 400, with error text {"error":{"code":"1214","message":"The messages parameter is illegal. Please check the document."}}. When this error appears, the functioning model remains unaffected, but selecting either of the other two models leads to the error.

image use glm-3-turbo, glm-4 image use glm-4v image use chatglm_turbo (correctly) image

image

✔️ Expected Behavior

All models are functioning properly.

❌ Actual Behavior

the four available models, only one model operates correctly in the workflow type (chatglm_turbo). The other two models result in errors (glm-3-turbo, glm-4), and one model seems to be in a state of self-entertainment (glm-4v), consistently producing hallucinatory results. There are two specific error prompts that occur: "Node LLM run failed: [Zhipu] Error: Error code: 400, with error text {"error":{"code":"1214","message":"The messages parameter is illegal. Please check the document."}}. When this error appears, the functioning model remains unaffected, but selecting either of the other two models leads to the error.

ixujue avatar Apr 18 '24 05:04 ixujue

The issue you're encountering with the ZhiPu AI models glm-3-turbo, glm-4, and glm-4v, where only the chatglm_turbo model operates correctly, seems to be related to the configuration and parameter rules of these models. The error message indicating "The messages parameter is illegal" suggests a problem with the request parameters, possibly due to incorrect formatting or values that the API does not accept.

To address this, ensure that your request parameters are correctly formatted and contain the expected values. The differences in behavior between the models could be due to specific parameters like temperature and top_p in the chatglm_turbo model, which control the output's randomness and creativity, making it more stable.

If the problem persists, reviewing the specific configurations for the glm-3-turbo, glm-4, and glm-4v models and comparing them to the chatglm_turbo model might provide further insights. Unfortunately, without direct access to these configurations or more detailed error logs, it's challenging to provide a more specific solution.

The Dify codebase includes several error handling mechanisms for ZhiPu AI models, which could help in diagnosing the issue further. Ensuring that your request aligns with the expected parameters and formats as per the Dify documentation might resolve the error.

Sources

About Dosu

This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.

Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.

If you want to continue the conversation, start your reply with @dosu-bot.

dosubot[bot] avatar Apr 18 '24 05:04 dosubot[bot]

This is a model related issue, pls check official documents of ZhipuAI.

Yeuoly avatar Apr 19 '24 06:04 Yeuoly

Hi, @ixujue,

I'm helping the Dify team manage their backlog and am marking this issue as stale. From what I understand, the issue involves errors with ZhiPu AI models when switching to the workflow type, with only one out of four available models operating correctly. The other two models result in errors, and one model consistently produces hallucinatory results. The error message "The messages parameter is illegal" suggests a problem with the request parameters, possibly due to incorrect formatting or values that the API does not accept. The discussion includes suggestions to review the specific configurations for the problematic models and ensure that request parameters align with the expected formats as per the Dify documentation. Additionally, it's recommended to consult the official documents of ZhipuAI for further insights.

Could you please confirm if this issue is still relevant to the latest version of the Dify repository? If it is, please let the Dify team know by commenting on the issue. Otherwise, feel free to close the issue yourself, or the issue will be automatically closed in 7 days.

Thank you!

dosubot[bot] avatar May 20 '24 16:05 dosubot[bot]

Please upgrade to latest version to see if this issue persists. :)

crazywoola avatar May 28 '24 07:05 crazywoola