mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 10:44:24 +00:00
fix(azure.py,-openai.py): correctly raise errors if streaming calls fail
This commit is contained in:
parent
9ba520cc8b
commit
c9fdbaf898
6 changed files with 110 additions and 24 deletions
|
@ -6739,7 +6739,10 @@ class CustomStreamWrapper:
|
|||
if str_line.choices[0].finish_reason:
|
||||
is_finished = True
|
||||
finish_reason = str_line.choices[0].finish_reason
|
||||
if str_line.choices[0].logprobs is not None:
|
||||
if (
|
||||
"logprobs" in str_line.choices[0]
|
||||
and str_line.choices[0].logprobs is not None
|
||||
):
|
||||
logprobs = str_line.choices[0].logprobs
|
||||
else:
|
||||
logprobs = None
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue