mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-07 08:26:10 +00:00
fix: add @log_guardrail_information decorator to CrowdStrike AIDR guardrail
The check_guardrail_apply_decorator.py CI check requires all guardrail apply_guardrail methods to have the @log_guardrail_information decorator. The CrowdStrike AIDR handler was missing it. Co-authored-by: Ishaan Jaff <ishaan-jaff@users.noreply.github.com>
This commit is contained in:
parent
c090987b9c
commit
49eb767a86
1 changed files with 5 additions and 1 deletions
|
|
@ -5,7 +5,10 @@ from typing_extensions import Any, override
|
|||
from fastapi import HTTPException
|
||||
|
||||
from litellm._logging import verbose_proxy_logger
|
||||
from litellm.integrations.custom_guardrail import CustomGuardrail
|
||||
from litellm.integrations.custom_guardrail import (
|
||||
CustomGuardrail,
|
||||
log_guardrail_information,
|
||||
)
|
||||
from litellm.llms.custom_httpx.http_handler import (
|
||||
get_async_httpx_client,
|
||||
httpxSpecialProvider,
|
||||
|
|
@ -272,6 +275,7 @@ class CrowdStrikeAIDRHandler(CustomGuardrail):
|
|||
transformed_texts.append(texts[len(transformed_texts)])
|
||||
return transformed_texts[: len(texts)]
|
||||
|
||||
@log_guardrail_information
|
||||
@override
|
||||
async def apply_guardrail(
|
||||
self,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue