content filter test fix
This commit is contained in:
parent
e49d094606
commit
8d10311b4b
@ -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…
Reference in New Issue
Block a user