mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-08 03:08:45 +00:00
chore(sap): suppress LIT002 on choices fallback list with reason
This commit is contained in:
parent
39a494c4fb
commit
7edb992763
1 changed files with 1 additions and 1 deletions
|
|
@ -59,7 +59,7 @@ class _StreamParser:
|
|||
model_dump() calls in the streaming handler don't raise
|
||||
"'MockValSer' object is not an instance of 'SchemaSerializer'"
|
||||
"""
|
||||
for choice in payload.get("choices") or []:
|
||||
for choice in payload.get("choices") or []: # mutable-ok: only iterated, never mutated
|
||||
if isinstance(choice, dict) and not choice.get("logprobs"):
|
||||
choice.pop("logprobs", None)
|
||||
chunk = OpenAIChatCompletionChunk.model_validate(payload)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue