mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-09 03:18:44 +00:00
test fix: tests.test_litellm.proxy.guardrails.guardrail_hooks.guardrails_ai.test_guardrails_ai::test_guardrails_ai_process_input
This commit is contained in:
parent
bb3b77cbeb
commit
80af02a1c3
1 changed files with 4 additions and 0 deletions
|
|
@ -167,6 +167,10 @@ class GuardrailsAI(CustomGuardrail):
|
|||
set_last_user_message,
|
||||
)
|
||||
|
||||
# Only process completion-related call types
|
||||
if call_type not in ["completion", "acompletion"]:
|
||||
return data
|
||||
|
||||
if "messages" not in data: # invalid request
|
||||
return data
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue