Tests working now!

This commit is contained in:
Brandon Hancock
2024-07-30 13:57:12 -04:00
parent a79efefe7b
commit 19f87f2b82
3 changed files with 10 additions and 19 deletions

View File

@@ -158,9 +158,7 @@ class Pipeline(BaseModel):
+ list(next_pipeline.stages)
+ self.stages[stage_index + 1 :]
)
traces.append(
[{"router": stage.__class__.__name__, "route_taken": route_taken}]
)
traces.append([{"route_taken": route_taken}])
stage_index += 1
continue
@@ -197,16 +195,6 @@ class Pipeline(BaseModel):
else:
raise ValueError(f"Unsupported stage type: {type(stage)}")
async def _process_pipeline(
self, pipeline: "Pipeline", current_input: Dict[str, Any]
) -> Tuple[List[CrewOutput], List[Union[str, Dict[str, Any]]]]:
results = await pipeline.process_single_kickoff(current_input)
outputs = [result.crews_outputs[-1] for result in results]
traces: List[Union[str, Dict[str, Any]]] = [
f"Nested Pipeline: {pipeline.__class__.__name__}"
]
return outputs, traces
async def _process_single_crew(
self, crew: Crew, current_input: Dict[str, Any]
) -> Tuple[List[CrewOutput], List[Union[str, Dict[str, Any]]]]:

View File

@@ -1,3 +1,4 @@
import logging
from dataclasses import dataclass
from typing import Any, Callable, Dict, Generic, Tuple, TypeVar