Skip to content

Commit

Permalink
adding agent to task output
Browse files Browse the repository at this point in the history
  • Loading branch information
joaomdmoura committed May 16, 2024
1 parent 208c3a7 commit a336381
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/crewai/task.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ def _execute(self, agent, task, context, tools):
description=self.description,
exported_output=exported_output,
raw_output=result,
agent=agent.role,
)

if self.callback:
Expand Down
1 change: 1 addition & 0 deletions src/crewai/tasks/task_output.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ class TaskOutput(BaseModel):
exported_output: Union[str, BaseModel] = Field(
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")

@model_validator(mode="after")
Expand Down

0 comments on commit a336381

Please sign in to comment.