mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-05 02:41:56 +00:00
fix(guardrails): log Conduct apply_guardrail decisions via log_guardrail_information
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
parent
747dda483e
commit
0f729bd767
1 changed files with 2 additions and 1 deletions
|
|
@ -10,7 +10,7 @@ from collections.abc import Mapping
|
|||
from types import MappingProxyType
|
||||
from typing import TYPE_CHECKING, Final, Literal
|
||||
|
||||
from litellm.integrations.custom_guardrail import CustomGuardrail
|
||||
from litellm.integrations.custom_guardrail import CustomGuardrail, log_guardrail_information
|
||||
from litellm.types.llms.openai import ChatCompletionUserMessage
|
||||
|
||||
if TYPE_CHECKING:
|
||||
|
|
@ -51,6 +51,7 @@ except ImportError as import_error:
|
|||
else:
|
||||
|
||||
class ConductGuardrail(ConductGuard): # pyright: ignore[reportUntypedBaseClass] # optional dep, absent at type-check
|
||||
@log_guardrail_information
|
||||
async def apply_guardrail(
|
||||
self,
|
||||
inputs: GenericGuardrailAPIInputs,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue