mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-26 00:28:13 +00:00
adding agent to task output
This commit is contained in:
@@ -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:
|
||||||
|
|||||||
@@ -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")
|
||||||
|
|||||||
Reference in New Issue
Block a user