mirror of
https://github.com/langgenius/dify-official-plugins.git
synced 2026-07-21 17:45:23 -04:00
Breaking Error in New Tongyi Plugin 0.0.21: "Extra data: line 1 column 20 (char 19)" When Calling Tools #254
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 @llinvokerl on GitHub (May 6, 2025).
Self Checks
Dify version
main
Cloud or Self Hosted
Self Hosted (Docker)
Steps to reproduce
delta.message.tool_calls[0].function.arguments, making it unparseable as JSON.✔️ Expected Behavior
No response
❌ Actual Behavior
No response
@dosubot[bot] commented on GitHub (May 6, 2025):
The error "Extra data: line 1 column 20 (char 19)" suggests that the JSON parsing is encountering unexpected data beyond what it expects to process. This typically happens when the input string is not a valid JSON format or contains additional characters that are not part of a valid JSON structure.
In the context of the Tongyi plugin version 0.0.21, it seems that the tool parameters from the LLM response are not being correctly formatted as JSON, leading to this parsing error. The
extract_tool_callsfunction in theFunctionCallAgentRunnerclass is likely usingjson.loadsto parse theargumentsstring, and if this string is not properly formatted as JSON, it will result in such an error.To address this issue, you might want to:
argumentsstring is correctly formatted as JSON before it is passed tojson.loads. This includes checking for any extraneous characters or formatting issues.These steps can help in identifying and resolving the issue with the tool parameter handling in the Tongyi plugin.
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
@shaojun commented on GitHub (May 7, 2025):
similar error, the agent node with qwen-max-latest (strategy: Function calling) worked fine, but today after i upgrade both dify (via docker to latest version 1.3.1) and tongyi plug in( to latest version 0.0.21), the node can not be ran through any more:
Downgrade
tongyiplug in to version0.0.18fixed the problem while the0.0.20and0.0.19still can't.