feat: add message type literal to usage stats (#2297)
Co-authored-by: Caren Thomas <caren@caren-mac.local>
This commit is contained in:
@@ -61,7 +61,7 @@ async def sse_async_generator(
|
||||
# Double-check the type
|
||||
if not isinstance(usage, LettaUsageStatistics):
|
||||
raise ValueError(f"Expected LettaUsageStatistics, got {type(usage)}")
|
||||
yield sse_formatter({"usage": usage.model_dump()})
|
||||
yield sse_formatter(usage.model_dump())
|
||||
|
||||
except ContextWindowExceededError as e:
|
||||
log_error_to_sentry(e)
|
||||
|
||||
Reference in New Issue
Block a user