mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-09 08:08:32 +00:00
Fix tool_utils to pass original_tools to ToolUsage
Co-Authored-By: Joe Moura <joao@crewai.com>
This commit is contained in:
@@ -60,6 +60,7 @@ def execute_tool_and_check_finality(
|
||||
task=task,
|
||||
agent=agent,
|
||||
action=agent_action,
|
||||
original_tools=tools, # Pass original tools to ensure custom tools work
|
||||
)
|
||||
|
||||
# Parse tool calling
|
||||
|
||||
@@ -57,12 +57,16 @@ def test_custom_tool_invocation():
|
||||
)
|
||||
|
||||
i18n = I18N()
|
||||
|
||||
mock_agent.key = "test_agent"
|
||||
mock_agent.role = "test_role"
|
||||
|
||||
result = execute_tool_and_check_finality(
|
||||
agent_action=action,
|
||||
tools=[custom_tool],
|
||||
i18n=i18n,
|
||||
agent_key=mock_agent.key if hasattr(mock_agent, "key") else None,
|
||||
agent_role=mock_agent.role if hasattr(mock_agent, "role") else None,
|
||||
agent_key=mock_agent.key,
|
||||
agent_role=mock_agent.role,
|
||||
tools_handler=tools_handler,
|
||||
task=mock_task,
|
||||
agent=mock_agent,
|
||||
|
||||
Reference in New Issue
Block a user