mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-09 08:08:32 +00:00
bringing TaskOutput.result back to avoind breakign change
This commit is contained in:
@@ -157,7 +157,7 @@ def callback_function(output: TaskOutput):
|
||||
print(f"""
|
||||
Task completed!
|
||||
Task: {output.description}
|
||||
Output: {output.result}
|
||||
Output: {output.raw_ouput}
|
||||
""")
|
||||
|
||||
research_task = Task(
|
||||
@@ -198,7 +198,7 @@ result = crew.kickoff()
|
||||
print(f"""
|
||||
Task completed!
|
||||
Task: {task1.output.description}
|
||||
Output: {task1.output.result}
|
||||
Output: {task1.output.raw_ouput}
|
||||
""")
|
||||
```
|
||||
|
||||
|
||||
@@ -18,3 +18,6 @@ class TaskOutput(BaseModel):
|
||||
excerpt = " ".join(self.description.split(" ")[:10])
|
||||
self.summary = f"{excerpt}..."
|
||||
return self
|
||||
|
||||
def result(self):
|
||||
return self.exported_output
|
||||
|
||||
@@ -237,7 +237,7 @@ class Telemetry:
|
||||
{
|
||||
"id": str(task.id),
|
||||
"description": task.description,
|
||||
"output": task.output.result,
|
||||
"output": task.output.raw_output,
|
||||
}
|
||||
for task in crew.tasks
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user