langgenius / dify

Dify is an open-source LLM app development platform. Dify's intuitive interface combines AI workflow, RAG pipeline, agent capabilities, model management, observability features and more, letting you quickly go from prototype to production.
https://dify.ai
Other
50.36k stars 7.22k forks source link

An error occurred while using the tool, and the code is displayed #8022

Closed jlokys closed 1 month ago

jlokys commented 1 month ago

Self Checks

Dify version

0.7.3

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

There is a chance that the following problem will occur during the conversation. I don’t know where the problem is. I hope you can provide support. image image

I used langfuse to track it, specifically: https://us.cloud.langfuse.com/project/cm0oz7lv5009ypumffzba18lf/traces/4488678d-8558-40c9-8681-2245a3db4f1e

✔️ Expected Behavior

No response

❌ Actual Behavior

No response

dosubot[bot] commented 1 month ago

Hey @jlokys! 👋 I'm here to help you with any bugs, questions, or contributions you have for Dify. Let's get to the bottom of this together!

I found some similar issues and discussions that might be relevant to your problem:

  1. llm call tools error (closed):

    • The issue was related to handling tool parameters. If the tool parameters are provided as a string and the tool expects a dictionary, a ValueError is raised. Ensure that the tool parameters are correctly formatted as a dictionary.
    • The specific error message generated was: Invalid timezone: {tz}. This message is returned when the provided timezone is invalid and cannot be recognized by the pytz_timezone function.
    • Solution: Ensure that the tool parameters are correctly formatted and that the timezone provided is valid [1].
  2. internal server error (closed):

    • This issue was related to environment variables and configurations in Docker setup. Ensure that the API URLs, database configuration, Redis configuration, and other environment variables are correctly set.
    • Solution: Verify and update the configurations, then restart your Docker containers to apply the changes [2].

For your specific issue with Unicode characters in query parameters, ensure that your system meets the minimum requirements for deploying Dify with Docker Compose and that the Node.js version is >=18.17.0 as specified in the package.json file [3][4][5].

Additionally, Dify processes and displays JSON responses from external tools in the chat interface by sending a POST request to the configured API endpoint and displaying the result field from the JSON response in the chat interface. Ensure that the JSON response is correctly formatted and that the result field is properly handled [6][7].

If you continue to experience issues, please provide more details or specific error messages to help diagnose the problem further.

To continue talking to Dosu, mention @dosu.

crazywoola commented 1 month ago

What LLM do you use?

crazywoola commented 1 month ago

I think this is a similar question, change it to a smarter model should solve your problem. => https://github.com/langgenius/dify/issues/8018

jlokys commented 1 month ago

I'm using zhipu GLM-4-Flash, you should be right, I'm using a higher quality model, it hasn't appeared yet. I need to continue testing and see.