From 8aa616698ede3f12de64b44ce311fa738f271460 Mon Sep 17 00:00:00 2001 From: Rayshard Thompson Date: Thu, 10 Jul 2025 21:03:42 -0400 Subject: [PATCH] Fix typo and import required types (#12487) --- docs/my-website/docs/proxy/call_hooks.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/my-website/docs/proxy/call_hooks.md b/docs/my-website/docs/proxy/call_hooks.md index c588ca0d0e6..b4e22027d19 100644 --- a/docs/my-website/docs/proxy/call_hooks.md +++ b/docs/my-website/docs/proxy/call_hooks.md @@ -18,7 +18,8 @@ This function is called just before a litellm completion call is made, and allow from litellm.integrations.custom_logger import CustomLogger import litellm from litellm.proxy.proxy_server import UserAPIKeyAuth, DualCache -from typing import Optional, Literal +from litellm.types.utils import ModelResponseStream +from typing import Any, AsyncGenerator, Optional, Literal # This file includes the custom callbacks for LiteLLM Proxy # Once defined, these can be passed in proxy_config.yaml @@ -72,7 +73,7 @@ class MyCustomHandler(CustomLogger): # https://docs.litellm.ai/docs/observabilit ): pass - aasync def async_post_call_streaming_iterator_hook( + async def async_post_call_streaming_iterator_hook( self, user_api_key_dict: UserAPIKeyAuth, response: Any, @@ -324,4 +325,4 @@ curl --location 'http://0.0.0.0:4000/chat/completions' \ "system_fingerprint": null, "usage": {} } -``` \ No newline at end of file +```