mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-22 00:31:44 +00:00
fix(streaming): enhance ModelResponseStream handling for custom LLM providers
This commit is contained in:
parent
edf75d6783
commit
13460010f0
1 changed files with 4 additions and 1 deletions
|
|
@ -1128,7 +1128,10 @@ class CustomStreamWrapper:
|
|||
completion_obj: Dict[str, Any] = {"content": ""}
|
||||
from litellm.types.utils import GenericStreamingChunk as GChunk
|
||||
|
||||
if isinstance(chunk, ModelResponseStream):
|
||||
if isinstance(chunk, ModelResponseStream) and (
|
||||
self.custom_llm_provider
|
||||
and self.custom_llm_provider in litellm._custom_providers
|
||||
):
|
||||
_has_content = bool(
|
||||
chunk.choices
|
||||
and chunk.choices[0].delta is not None
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue