Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion backend/director/core/reasoning.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,10 @@ def step(self):
self.summary_content.text = llm_response.content
self.summary_content.status = MsgStatus.success
else:
self.summary_content.text = (
self.summary_content.text + llm_response.content
if self.summary_content.text else llm_response.content
)
self.session.reasoning_context.append(
ContextMessage(
content=SUMMARIZATION_PROMPT.format(
Expand All @@ -306,7 +310,11 @@ def step(self):
]
)
self.session.reasoning_context.pop()
self.summary_content.text = summary_response.content
if summary_response.content not in self.summary_content.text:
self.summary_content.text += (
f"\n{summary_response.content}"
if self.summary_content.text else summary_response.content
)
if self.failed_agents:
self.summary_content.status = MsgStatus.error
else:
Expand Down