mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-06 02:48:13 +00:00
fix(streaming): include ModelResponseStream in _extract_usage_chunk annotation
This commit is contained in:
parent
8a4942340e
commit
21c126464b
1 changed files with 1 additions and 1 deletions
|
|
@ -517,7 +517,7 @@ class ChunkProcessor:
|
|||
return reasoning_tokens
|
||||
|
||||
@staticmethod
|
||||
def _extract_usage_chunk(chunk: dict[str, Any] | ModelResponse) -> Usage | None:
|
||||
def _extract_usage_chunk(chunk: dict[str, Any] | ModelResponse | ModelResponseStream) -> Usage | None:
|
||||
usage_chunk: Usage | dict[str, Any] | None = None
|
||||
if hasattr(chunk, "usage") and chunk.usage is not None:
|
||||
usage_chunk = chunk.usage
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue