mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-08 15:48:29 +00:00
fix: update type hints and imports for defaultdict
Co-Authored-By: Joe Moura <joao@crewai.com>
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
from collections.abc import Callable
|
from collections import defaultdict
|
||||||
from typing import Any, Dict, List, Union, Annotated, DefaultDict
|
from typing import Any, Dict, List, Union
|
||||||
|
|
||||||
from pydantic import (
|
from pydantic import (
|
||||||
BaseModel,
|
BaseModel,
|
||||||
@@ -40,12 +40,12 @@ class CrewEvaluator(BaseModel):
|
|||||||
llm: Union[str, InstanceOf[LLM], Any] = Field(
|
llm: Union[str, InstanceOf[LLM], Any] = Field(
|
||||||
description="Language model that will run the evaluation."
|
description="Language model that will run the evaluation."
|
||||||
)
|
)
|
||||||
tasks_scores: DefaultDict[int, List[float]] = Field(
|
tasks_scores: Dict[int, List[float]] = Field(
|
||||||
default_factory=lambda: DefaultDict(list),
|
default_factory=lambda: defaultdict(list),
|
||||||
description="Dictionary to store the scores of the agents for each task."
|
description="Dictionary to store the scores of the agents for each task."
|
||||||
)
|
)
|
||||||
run_execution_times: DefaultDict[int, List[int]] = Field(
|
run_execution_times: Dict[int, List[int]] = Field(
|
||||||
default_factory=lambda: DefaultDict(list),
|
default_factory=lambda: defaultdict(list),
|
||||||
description="Dictionary to store execution times for each run."
|
description="Dictionary to store execution times for each run."
|
||||||
)
|
)
|
||||||
iteration: int = Field(
|
iteration: int = Field(
|
||||||
|
|||||||
Reference in New Issue
Block a user