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

tool parameters parsing not compatible with the response of glm4 model in xinference provider when function tool call integerated #11048

Open
5 tasks done
cyflhn opened this issue Nov 25, 2024 · 1 comment
Labels
🤖 feat:agent Agent related topics 🔨 feat:tools Tools for agent, function call related stuff.

Comments

@cyflhn
Copy link
Contributor

cyflhn commented Nov 25, 2024

Self Checks

  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

0.10.0

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

  1. add a glm4-chat-1m model in xinference model provider
  2. create agent with function tool integrated.
  3. start a chat in this agent

✔️ Expected Behavior

get a normal response from agent

❌ Actual Behavior

got an error of "tool_parameters should be a dict, but got a string"

@dosubot dosubot bot added 🔨 feat:tools Tools for agent, function call related stuff. 🤖 feat:agent Agent related topics labels Nov 25, 2024
Copy link

dosubot bot commented Nov 25, 2024

The error "tool_parameters should be a dict, but got a string" typically occurs when the tool_parameters are incorrectly handled or assigned as a string instead of a dictionary. In the Dify platform, the _generate_parameters method in the ToolNode class is responsible for generating a dictionary of parameters. If node_data.tool_parameters is set as a string, this error will occur because the code expects a dictionary format [1].

To resolve this issue, ensure that the tool_parameters are correctly formatted as a dictionary when integrating the glm4 model with the xinference provider. Check the part of your code where tool_parameters are being set or passed to ensure they are structured as a dictionary. This should help in aligning the parameter parsing with the expected format.

To continue talking to Dosu, mention @dosu.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🤖 feat:agent Agent related topics 🔨 feat:tools Tools for agent, function call related stuff.
Projects
None yet
Development

No branches or pull requests

1 participant