mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-09 16:18:30 +00:00
Avoid empty task outputs
This commit is contained in:
@@ -254,7 +254,7 @@ class Crew(BaseModel):
|
||||
if self.full_output:
|
||||
return {
|
||||
"final_output": output,
|
||||
"tasks_outputs": [task.output for task in self.tasks],
|
||||
"tasks_outputs": [task.output for task in self.tasks if task],
|
||||
}
|
||||
else:
|
||||
return output
|
||||
|
||||
@@ -116,7 +116,8 @@ class Task(BaseModel):
|
||||
for task in self.context:
|
||||
if task.async_execution:
|
||||
task.thread.join()
|
||||
context.append(task.output.raw_output)
|
||||
if task and task.output:
|
||||
context.append(task.output.raw_output)
|
||||
context = "\n".join(context)
|
||||
|
||||
tools = tools or self.tools
|
||||
|
||||
Reference in New Issue
Block a user