LLMAssistantAggregator: reset aggregation after adding the thought, not before
This commit is contained in:
@@ -950,7 +950,6 @@ class LLMAssistantAggregator(LLMContextAggregator):
|
|||||||
return
|
return
|
||||||
|
|
||||||
thought = concatenate_aggregated_text(self._thought_aggregation)
|
thought = concatenate_aggregated_text(self._thought_aggregation)
|
||||||
await self._reset_thought_aggregation()
|
|
||||||
|
|
||||||
if self._thought_append_to_context:
|
if self._thought_append_to_context:
|
||||||
llm = self._thought_llm
|
llm = self._thought_llm
|
||||||
@@ -966,6 +965,9 @@ class LLMAssistantAggregator(LLMContextAggregator):
|
|||||||
)
|
)
|
||||||
|
|
||||||
message = AssistantThoughtMessage(content=thought, timestamp=self._thought_start_time)
|
message = AssistantThoughtMessage(content=thought, timestamp=self._thought_start_time)
|
||||||
|
|
||||||
|
await self._reset_thought_aggregation()
|
||||||
|
|
||||||
await self._call_event_handler("on_assistant_thought", message)
|
await self._call_event_handler("on_assistant_thought", message)
|
||||||
|
|
||||||
def _context_updated_task_finished(self, task: asyncio.Task):
|
def _context_updated_task_finished(self, task: asyncio.Task):
|
||||||
|
|||||||
Reference in New Issue
Block a user