mirror of
https://github.com/langgenius/dify-official-plugins.git
synced 2026-07-22 01:55:27 -04:00
[PR #2474] [Fix Bug]Fix agent strategy function_calling.py #2504
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?
📋 Pull Request Information
Original PR: https://github.com/langgenius/dify-official-plugins/pull/2474
Author: @shua-chen
Created: 1/22/2026
Status: 🔄 Open
Base:
main← Head:main📝 Commits (3)
5d211ebUpdate function_calling.pyd110be5Update function_calling.py12f72e3fix: finish_log_message try to get Nonetype object's attribute📊 Changes
1 file changed (+3 additions, -3 deletions)
View changed files
📝
agent-strategies/cot_agent/strategies/function_calling.py(+3 -3)📄 Description
Fix Bug. When the model hallucinates and calls a non-existent tool, the agent strategy will directly use the corresponding key to index in the dictionary, thereby triggering a KeyError
Related Issues or Context
This PR contains Changes to Non-Plugin
This PR contains Changes to Non-LLM Models Plugin
This PR contains Changes to LLM Models Plugin
Version Control (Any Changes to the Plugin Will Require Bumping the Version)
VersionField, Not in Meta Section)Dify Plugin SDK Version
dify_plugin>=0.3.0,<0.6.0is in requirements.txt (SDK docs)Environment Verification (If Any Code Changes)
Local Deployment Environment
SaaS Environment
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.