mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-11 17:18:29 +00:00
WIP
This commit is contained in:
@@ -7,15 +7,15 @@ from typing import TYPE_CHECKING, Any, Dict, List, Optional, Tuple, Union
|
||||
|
||||
from langchain_core.callbacks import BaseCallbackHandler
|
||||
from pydantic import (
|
||||
UUID4,
|
||||
BaseModel,
|
||||
ConfigDict,
|
||||
Field,
|
||||
InstanceOf,
|
||||
Json,
|
||||
PrivateAttr,
|
||||
field_validator,
|
||||
model_validator,
|
||||
UUID4,
|
||||
BaseModel,
|
||||
ConfigDict,
|
||||
Field,
|
||||
InstanceOf,
|
||||
Json,
|
||||
PrivateAttr,
|
||||
field_validator,
|
||||
model_validator,
|
||||
)
|
||||
from pydantic_core import PydanticCustomError
|
||||
|
||||
@@ -34,14 +34,15 @@ from crewai.tools.agent_tools import AgentTools
|
||||
from crewai.utilities import I18N, FileHandler, Logger, RPMController
|
||||
from crewai.utilities.constants import TRAINED_AGENTS_DATA_FILE, TRAINING_DATA_FILE
|
||||
from crewai.utilities.evaluators.task_evaluator import TaskEvaluator
|
||||
from crewai.utilities.formatter import (
|
||||
aggregate_raw_outputs_from_task_outputs,
|
||||
aggregate_raw_outputs_from_tasks,
|
||||
from crewai.utilities.formatter import (
|
||||
aggregate_raw_outputs_from_task_outputs,
|
||||
aggregate_raw_outputs_from_tasks,
|
||||
)
|
||||
from crewai.utilities.task_output_storage_handler import TaskOutputStorageHandler
|
||||
from crewai.utilities.training_handler import CrewTrainingHandler
|
||||
|
||||
try:
|
||||
import agentops
|
||||
except ImportError:
|
||||
agentops = None
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@ class Procedure(BaseModel):
|
||||
def kickoff(self, inputs: List[Dict[str, Any]]) -> List[CrewOutput]:
|
||||
current_inputs = inputs
|
||||
|
||||
crew_outputs = []
|
||||
for index, crew in enumerate(self.crews):
|
||||
# Process all inputs for the current crew
|
||||
crew_outputs = self._process_crew(crew, current_inputs)
|
||||
@@ -30,6 +31,8 @@ class Procedure(BaseModel):
|
||||
|
||||
async def kickoff_async(self, inputs: List[Dict[str, Any]]) -> List[CrewOutput]:
|
||||
current_inputs = inputs
|
||||
|
||||
crew_outputs = []
|
||||
for index, crew in enumerate(self.crews):
|
||||
# Process all inputs for the current crew
|
||||
crew_outputs = await self._process_crew(crew, current_inputs)
|
||||
|
||||
Reference in New Issue
Block a user