mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-27 11:43:54 +00:00
fix handle_openai_chat_completion_chunk
This commit is contained in:
parent
31905a69da
commit
1821b32491
1 changed files with 1 additions and 1 deletions
|
@ -8301,7 +8301,7 @@ class CustomStreamWrapper:
|
|||
logprobs = None
|
||||
usage = None
|
||||
original_chunk = None # this is used for function/tool calling
|
||||
if len(str_line.choices) > 0:
|
||||
if str_line and str_line.choices and len(str_line.choices) > 0:
|
||||
if (
|
||||
str_line.choices[0].delta is not None
|
||||
and str_line.choices[0].delta.content is not None
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue