fix: add correct logging (#9603)

This commit is contained in:
Ari Webb
2026-02-20 16:36:04 -08:00
committed by Caren Thomas
parent 8fc77af685
commit a9a6a5f29d

View File

@@ -320,9 +320,6 @@ class OpenAIStreamingInterface:
# Track events for diagnostics # Track events for diagnostics
self.total_events_received += 1 self.total_events_received += 1
self.last_event_type = "ChatCompletionChunk" self.last_event_type = "ChatCompletionChunk"
# Track events for diagnostics
self.total_events_received += 1
self.last_event_type = "ChatCompletionChunk"
if not self.model or not self.message_id: if not self.model or not self.message_id:
self.model = chunk.model self.model = chunk.model
@@ -833,6 +830,10 @@ class SimpleOpenAIStreamingInterface:
prev_message_type: Optional[str] = None, prev_message_type: Optional[str] = None,
message_index: int = 0, message_index: int = 0,
) -> AsyncGenerator[LettaMessage | LettaStopReason, None]: ) -> AsyncGenerator[LettaMessage | LettaStopReason, None]:
# Track events for diagnostics
self.total_events_received += 1
self.last_event_type = "ChatCompletionChunk"
if not self.model or not self.message_id: if not self.model or not self.message_id:
self.model = chunk.model self.model = chunk.model
self.message_id = chunk.id self.message_id = chunk.id