Skip to content

Commit 68aaeb4

Browse files
Merge pull request #13914 from uc4w6c/docs/fix-custom-guardrail-imports
Fix missing and unused imports in custom_guardrail docs example
2 parents 0d285c8 + cca1ea1 commit 68aaeb4

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

docs/my-website/docs/proxy/guardrails/custom_guardrail.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,14 @@ A CustomGuardrail has 4 methods to enforce guardrails
2323

2424
Create a new file called `custom_guardrail.py` and add this code to it
2525
```python
26-
from typing import Any, Dict, List, Literal, Optional, Union
26+
from typing import Any, AsyncGenerator, Literal, Optional, Union
2727

2828
import litellm
2929
from litellm._logging import verbose_proxy_logger
3030
from litellm.caching.caching import DualCache
3131
from litellm.integrations.custom_guardrail import CustomGuardrail
3232
from litellm.proxy._types import UserAPIKeyAuth
33-
from litellm.proxy.guardrails.guardrail_helpers import should_proceed_based_on_metadata
34-
from litellm.types.guardrails import GuardrailEventHooks
33+
from litellm.types.utils import ModelResponseStream
3534

3635

3736
class myCustomGuardrail(CustomGuardrail):

0 commit comments

Comments
 (0)