mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-06 02:48:13 +00:00
Update litellm/litellm_core_utils/streaming_handler.py
Accepting the suugestion. Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
This commit is contained in:
parent
ee7b0cdf02
commit
589169c715
1 changed files with 2 additions and 1 deletions
|
|
@ -1109,10 +1109,11 @@ class CustomStreamWrapper:
|
|||
and self.custom_llm_provider in litellm._custom_providers
|
||||
):
|
||||
if self.received_finish_reason is not None:
|
||||
_chunk_has_content = isinstance(chunk, dict) and (
|
||||
_chunk_has_content = isinstance(chunk, dict) and (
|
||||
bool(chunk.get("text", ""))
|
||||
or chunk.get("tool_use") is not None
|
||||
or chunk.get("reasoning_content") is not None
|
||||
or bool(chunk.get("reasoning_content", ""))
|
||||
)
|
||||
if not _chunk_has_content and (
|
||||
not isinstance(chunk, dict)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue