Fix typo and import required types (#12487)

This commit is contained in:
Rayshard Thompson 2025-07-10 21:03:42 -04:00 • committed by GitHub
parent 52e4cc9a04
commit 8aa616698e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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": {}
}
```
```