mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-19 00:01:29 +00:00
content filter test fix
This commit is contained in:
parent
1f61794c12
commit
7021da85d2
2 changed files with 7 additions and 5 deletions
|
|
@ -29,10 +29,7 @@ from fastapi import HTTPException
|
|||
|
||||
from litellm import Router
|
||||
from litellm._logging import verbose_proxy_logger
|
||||
from litellm.integrations.custom_guardrail import (
|
||||
CustomGuardrail,
|
||||
log_guardrail_information,
|
||||
)
|
||||
from litellm.integrations.custom_guardrail import CustomGuardrail
|
||||
from litellm.proxy._types import UserAPIKeyAuth
|
||||
from litellm.types.utils import ModelResponseStream
|
||||
|
||||
|
|
@ -1056,7 +1053,6 @@ class ContentFilterGuardrail(CustomGuardrail):
|
|||
masked_entity_count=masked_entity_count,
|
||||
)
|
||||
|
||||
@log_guardrail_information
|
||||
async def apply_guardrail(
|
||||
self,
|
||||
inputs: "GenericGuardrailAPIInputs",
|
||||
|
|
|
|||
|
|
@ -83,6 +83,12 @@ def test_guardrail_apply_decorator():
|
|||
if python_file.name == "bedrock_guardrails.py":
|
||||
continue
|
||||
|
||||
# Skip content_filter.py - it implements its own detailed logging via
|
||||
# _log_guardrail_information with detections, masked_entity_count, etc.
|
||||
# Using the decorator would cause duplicate entries.
|
||||
if python_file.name == "content_filter.py":
|
||||
continue
|
||||
|
||||
results = find_apply_guardrail_methods(python_file)
|
||||
|
||||
for class_name, line_num, has_decorator in results:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue