mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-04 02:31:27 +00:00
chore(sap): suppress LIT002 on choices fallback list with reason
This commit is contained in:
parent
27e45cd855
commit
70e540ddc8
1 changed files with 1 additions and 1 deletions
|
|
@ -60,7 +60,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