The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]
Python ai-gatewayanthropicazure-openaibedrockgatewaylangchainlitellmllmllm-gatewayllmopsmcp-gatewayopenaiopenai-proxyrustrust-aivertex-ai
Fix missing and unused imports in custom_guardrail docs example
Yuta Saitocca1ea1592e4
diff --git a/docs/my-website/docs/proxy/guardrails/custom_guardrail.md b/docs/my-website/docs/proxy/guardrails/custom_guardrail.mdindex 657ccab68e4..b8ba64d333a 100644--- a/docs/my-website/docs/proxy/guardrails/custom_guardrail.md+++ b/docs/my-website/docs/proxy/guardrails/custom_guardrail.md@@ -23,15 +23,14 @@ A CustomGuardrail has 4 methods to enforce guardrailsCreate a new file called `custom_guardrail.py` and add this code to it```python-from typing import Any, Dict, List, Literal, Optional, Union+from typing import Any, AsyncGenerator, Literal, Optional, Unionimport litellmfrom litellm._logging import verbose_proxy_loggerfrom litellm.caching.caching import DualCachefrom litellm.integrations.custom_guardrail import CustomGuardrailfrom litellm.proxy._types import UserAPIKeyAuth-from litellm.proxy.guardrails.guardrail_helpers import should_proceed_based_on_metadata-from litellm.types.guardrails import GuardrailEventHooks+from litellm.types.utils import ModelResponseStreamclass myCustomGuardrail(CustomGuardrail):