Skip to content

Commit 137b785

Browse files
committed
Handle the case where we may end before we get any output
1 parent 182ee1a commit 137b785

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

llmstack/apps/runner/agent_actor.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,11 @@ async def _process_output(self):
130130
{
131131
"output": {
132132
**self._agent_outputs,
133-
"output": self._stitched_data["agent"][str(message_index)].data.content[0].data,
133+
"output": (
134+
self._stitched_data["agent"][str(message_index)].data.content[0].data
135+
if str(message_index) in self._stitched_data["agent"]
136+
else ""
137+
),
134138
},
135139
"chunks": self._stitched_data,
136140
}

0 commit comments

Comments
 (0)