fix: Improve type conversion for LLM parameters and handle None values properly

Co-Authored-By: Joe Moura <joao@crewai.com>
This commit is contained in:
Devin AI
2024-12-31 20:45:25 +00:00
parent f75b07ce82
commit dec255e87a
2 changed files with 68 additions and 5 deletions

View File

@@ -642,9 +642,10 @@ def test_task_tools_override_agent_tools():
crew.kickoff()
# Verify task tools override agent tools
assert len(task.tools) == 1 # AnotherTestTool
assert any(isinstance(tool, AnotherTestTool) for tool in task.tools)
assert not any(isinstance(tool, TestTool) for tool in task.tools)
tools = task.tools or []
assert len(tools) == 1 # AnotherTestTool
assert any(isinstance(tool, AnotherTestTool) for tool in tools)
assert not any(isinstance(tool, TestTool) for tool in tools)
# Verify agent tools remain unchanged
assert len(new_researcher.tools) == 1