From 908b481f0f5570d37f67dc5322058b84d5483434 Mon Sep 17 00:00:00 2001 From: Ishaan Jaff Date: Thu, 23 May 2024 09:34:38 -0700 Subject: [PATCH] docs - fix litellm call hooks docs --- docs/my-website/docs/proxy/call_hooks.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/my-website/docs/proxy/call_hooks.md b/docs/my-website/docs/proxy/call_hooks.md index 3a8726e8793..ce34e5ad6b6 100644 --- a/docs/my-website/docs/proxy/call_hooks.md +++ b/docs/my-website/docs/proxy/call_hooks.md @@ -17,6 +17,8 @@ This function is called just before a litellm completion call is made, and allow ```python from litellm.integrations.custom_logger import CustomLogger import litellm +from litellm.proxy.proxy_server import UserAPIKeyAuth, DualCache +from typing import Optional, Literal # This file includes the custom callbacks for LiteLLM Proxy # Once defined, these can be passed in proxy_config.yaml @@ -34,7 +36,7 @@ class MyCustomHandler(CustomLogger): # https://docs.litellm.ai/docs/observabilit "image_generation", "moderation", "audio_transcription", - ]) -> Optional[dict, str, Exception]: + ]): data["model"] = "my-new-model" return data