mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-08 22:21:35 +00:00
Update litellm/integrations/custom_guardrail.py
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
This commit is contained in:
parent
9ed07e7172
commit
0cab023b4f
1 changed files with 1 additions and 1 deletions
|
|
@ -142,7 +142,7 @@ class CustomGuardrail(CustomLogger):
|
|||
Optional[List[int]],
|
||||
]:
|
||||
"""Filter to only the latest message for target_role."""
|
||||
import copy
|
||||
|
||||
|
||||
for index in range(len(messages) - 1, -1, -1):
|
||||
if messages[index].get("role") == target_role:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue