adding agent to task output

This commit is contained in:
João Moura
2024-05-16 05:12:32 -03:00
parent 77f595e617
commit 393a86792c
2 changed files with 2 additions and 0 deletions

View File

@@ -201,6 +201,7 @@ class Task(BaseModel):
description=self.description, description=self.description,
exported_output=exported_output, exported_output=exported_output,
raw_output=result, raw_output=result,
agent=agent.role,
) )
if self.callback: if self.callback:

View File

@@ -11,6 +11,7 @@ class TaskOutput(BaseModel):
exported_output: Union[str, BaseModel] = Field( exported_output: Union[str, BaseModel] = Field(
description="Output of the task", default=None description="Output of the task", default=None
) )
agent: str = Field(description="Agent that executed the task")
raw_output: str = Field(description="Result of the task") raw_output: str = Field(description="Result of the task")
@model_validator(mode="after") @model_validator(mode="after")