mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-10 00:28:31 +00:00
fix: Fix tests (#873)
* fix: call asserts * fix: test_increment_tool_errors * fix: test_increment_delegations_for_sequential_process * fix: test_increment_delegations_for_hierarchical_process * fix: test_code_execution_flag_adds_code_tool_upon_kickoff * fix: test_tool_usage_information_is_appended_to_agent * fix: try to fix test_crew_full_output * fix: try to fix test_crew_full_output * fix: test remove vcr to test crew_test test * fix: comment test to see if ci passes * fix: comment test to see if ci passes * fix: test changing prompt tokens to get error on CI * fix: test changing prompt tokens to get error on CI * fix: test changing prompt tokens to get error on CI * fix: test changing prompt tokens to get error on CI * fix: test new approach * fix: comment funciont not working in CI * fix: github python version * fix: remove need of vcr * fix: fix and add comments for all type checking errors
This commit is contained in:
committed by
GitHub
parent
2fb56f1f9f
commit
bb64c80964
@@ -1,6 +1,8 @@
|
||||
from abc import ABC, abstractmethod
|
||||
from typing import List, Optional, Union
|
||||
|
||||
from pydantic import BaseModel, Field
|
||||
|
||||
from crewai.agents.agent_builder.base_agent import BaseAgent
|
||||
from crewai.task import Task
|
||||
from crewai.utilities import I18N
|
||||
@@ -53,7 +55,7 @@ class BaseAgentTools(BaseModel, ABC):
|
||||
# {"task": "....", "coworker": "...."}
|
||||
agent_name = agent.casefold().replace('"', "").replace("\n", "")
|
||||
|
||||
agent = [
|
||||
agent = [ # type: ignore # Incompatible types in assignment (expression has type "list[BaseAgent]", variable has type "str | None")
|
||||
available_agent
|
||||
for available_agent in self.agents
|
||||
if available_agent.role.casefold().replace("\n", "") == agent_name
|
||||
@@ -73,9 +75,9 @@ class BaseAgentTools(BaseModel, ABC):
|
||||
)
|
||||
|
||||
agent = agent[0]
|
||||
task = Task(
|
||||
task = Task( # type: ignore # Incompatible types in assignment (expression has type "Task", variable has type "str")
|
||||
description=task,
|
||||
agent=agent,
|
||||
expected_output="Your best answer to your coworker asking you this, accounting for the context shared.",
|
||||
)
|
||||
return agent.execute_task(task, context)
|
||||
return agent.execute_task(task, context) # type: ignore # "str" has no attribute "execute_task"
|
||||
|
||||
Reference in New Issue
Block a user