mirror of
https://github.com/BerriAI/litellm.git
synced 2026-08-28 05:25:59 +00:00
style: format streaming usage normalization
This commit is contained in:
parent
58d7a321fa
commit
678e89fc2e
1 changed files with 1 additions and 3 deletions
|
|
@ -1571,9 +1571,7 @@ class CustomStreamWrapper:
|
|||
|
||||
if hasattr(chunk, "usage") and chunk.usage is not None:
|
||||
model_response.usage = (
|
||||
litellm.Usage(**chunk.usage.model_dump())
|
||||
if isinstance(chunk.usage, BaseModel)
|
||||
else chunk.usage
|
||||
litellm.Usage(**chunk.usage.model_dump()) if isinstance(chunk.usage, BaseModel) else chunk.usage
|
||||
)
|
||||
|
||||
## RETURN ARG
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue