mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-04 02:31:27 +00:00
fix(policy_engine): move mutable-ok suppressions onto the flagged lines
This commit is contained in:
parent
ec677e5e74
commit
85fea1a675
1 changed files with 2 additions and 6 deletions
|
|
@ -989,12 +989,8 @@ class OpenAIChatCompletionsHandler(BaseTranslation):
|
|||
return
|
||||
await self._apply_guardrail_responses_to_output_streaming(
|
||||
responses=responses_so_far,
|
||||
guardrailed_texts=[
|
||||
after for _choice_idx, after in changed
|
||||
], # mutable-ok: the callee's signature predates this change and takes lists
|
||||
task_mappings=[
|
||||
(choice_idx, None) for choice_idx, _after in changed
|
||||
], # mutable-ok: the callee's signature predates this change and takes lists
|
||||
guardrailed_texts=[after for _choice_idx, after in changed], # mutable-ok: callee takes lists
|
||||
task_mappings=[(choice_idx, None) for choice_idx, _after in changed], # mutable-ok: callee takes lists
|
||||
)
|
||||
|
||||
async def _apply_guardrail_responses_to_output_streaming(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue