services: use push_context_frame()

This commit is contained in:
Aleix Conchillo Flaqué
2025-02-13 13:19:46 -08:00
parent 67cdc0063a
commit 99779046a8
5 changed files with 5 additions and 10 deletions

View File

@@ -804,8 +804,7 @@ class AnthropicAssistantContextAggregator(LLMAssistantContextAggregator):
await properties.on_context_updated()
# Push context frame
frame = OpenAILLMContextFrame(self._context)
await self.push_frame(frame)
await self.push_context_frame()
# Push timestamp frame with current time
timestamp_frame = OpenAILLMContextAssistantTimestampFrame(timestamp=time_now_iso8601())

View File

@@ -633,8 +633,7 @@ class GoogleAssistantContextAggregator(OpenAIAssistantContextAggregator):
await properties.on_context_updated()
# Push context frame
frame = OpenAILLMContextFrame(self._context)
await self.push_frame(frame)
await self.push_context_frame()
# Push timestamp frame with current time
timestamp_frame = OpenAILLMContextAssistantTimestampFrame(timestamp=time_now_iso8601())

View File

@@ -98,8 +98,7 @@ class GrokAssistantContextAggregator(OpenAIAssistantContextAggregator):
if properties and properties.on_context_updated is not None:
await properties.on_context_updated()
frame = OpenAILLMContextFrame(self._context)
await self.push_frame(frame)
await self.push_context_frame()
except Exception as e:
logger.error(f"Error processing frame: {e}")

View File

@@ -692,8 +692,7 @@ class OpenAIAssistantContextAggregator(LLMAssistantContextAggregator):
await properties.on_context_updated()
# Push context frame
frame = OpenAILLMContextFrame(self._context)
await self.push_frame(frame)
await self.push_context_frame()
# Push timestamp frame with current time
timestamp_frame = OpenAILLMContextAssistantTimestampFrame(timestamp=time_now_iso8601())

View File

@@ -234,8 +234,7 @@ class OpenAIRealtimeAssistantContextAggregator(OpenAIAssistantContextAggregator)
if properties and properties.on_context_updated is not None:
await properties.on_context_updated()
frame = OpenAILLMContextFrame(self._context)
await self.push_frame(frame)
await self.push_context_frame()
except Exception as e:
logger.error(f"Error processing frame: {e}")