forked from phoenix/litellm-mirror
(fix) openai + stream - logprobs check
This commit is contained in:
parent
10a74d02c1
commit
7864d9a027
1 changed files with 3 additions and 1 deletions
|
@ -6746,8 +6746,10 @@ class CustomStreamWrapper:
|
|||
if str_line.choices[0].finish_reason:
|
||||
is_finished = True
|
||||
finish_reason = str_line.choices[0].finish_reason
|
||||
|
||||
# checking for logprobs
|
||||
if (
|
||||
"logprobs" in str_line.choices[0]
|
||||
hasattr(str_line.choices[0], "logprobs")
|
||||
and str_line.choices[0].logprobs is not None
|
||||
):
|
||||
logprobs = str_line.choices[0].logprobs
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue