Brandon/cre 19 workflows (#1347)

Flows
This commit is contained in:
Brandon Hancock (bhancock_ai)
2024-09-27 11:11:17 -04:00
committed by GitHub
parent f94aee3dc8
commit f82420e7d6
16 changed files with 1129 additions and 8 deletions

View File

@@ -41,6 +41,14 @@ class CrewOutput(BaseModel):
output_dict.update(self.pydantic.model_dump())
return output_dict
def __getitem__(self, key):
if self.pydantic and hasattr(self.pydantic, key):
return getattr(self.pydantic, key)
elif self.json_dict and key in self.json_dict:
return self.json_dict[key]
else:
raise KeyError(f"Key '{key}' not found in CrewOutput.")
def __str__(self):
if self.pydantic:
return str(self.pydantic)