fix(llm_guard.py): add streaming hook for moderation calls

This commit is contained in:
Krrish Dholakia 2024-02-20 20:31:32 -08:00
parent 0a5b8f0e4e
commit 49847347d0
4 changed files with 36 additions and 25 deletions

View file

@ -75,6 +75,13 @@ class CustomLogger: # https://docs.litellm.ai/docs/observability/custom_callbac
async def async_moderation_hook(self, data: dict):
pass
async def async_post_call_streaming_hook(
self,
user_api_key_dict: UserAPIKeyAuth,
response: str,
):
pass
#### SINGLE-USE #### - https://docs.litellm.ai/docs/observability/custom_callback#using-your-custom-callback-function
def log_input_event(self, model, messages, kwargs, print_verbose, callback_func):