mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 18:54:30 +00:00
feat(llm_guard.py): enable key-specific llm guard check
This commit is contained in:
parent
bec093675c
commit
e10eb8f6fe
8 changed files with 26 additions and 3 deletions
|
@ -141,6 +141,7 @@ class ProxyLogging:
|
|||
async def during_call_hook(
|
||||
self,
|
||||
data: dict,
|
||||
user_api_key_dict: UserAPIKeyAuth,
|
||||
call_type: Literal[
|
||||
"completion",
|
||||
"embeddings",
|
||||
|
@ -157,7 +158,9 @@ class ProxyLogging:
|
|||
try:
|
||||
if isinstance(callback, CustomLogger):
|
||||
await callback.async_moderation_hook(
|
||||
data=new_data, call_type=call_type
|
||||
data=new_data,
|
||||
user_api_key_dict=user_api_key_dict,
|
||||
call_type=call_type,
|
||||
)
|
||||
except Exception as e:
|
||||
raise e
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue