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