mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 02:34:29 +00:00
fix linting error
This commit is contained in:
parent
9e821c915c
commit
a28ac57233
5 changed files with 11 additions and 5 deletions
|
@ -163,7 +163,7 @@ class AporiaGuardrail(CustomGuardrail):
|
|||
|
||||
pass
|
||||
|
||||
async def async_moderation_hook( ### 👈 KEY CHANGE ###
|
||||
async def async_moderation_hook(
|
||||
self,
|
||||
data: dict,
|
||||
user_api_key_dict: UserAPIKeyAuth,
|
||||
|
@ -173,6 +173,7 @@ class AporiaGuardrail(CustomGuardrail):
|
|||
"image_generation",
|
||||
"moderation",
|
||||
"audio_transcription",
|
||||
"responses",
|
||||
],
|
||||
):
|
||||
from litellm.proxy.common_utils.callback_utils import (
|
||||
|
|
|
@ -31,7 +31,7 @@ class _ENTERPRISE_OpenAI_Moderation(CustomLogger):
|
|||
|
||||
#### CALL HOOKS - proxy only ####
|
||||
|
||||
async def async_moderation_hook( ### 👈 KEY CHANGE ###
|
||||
async def async_moderation_hook(
|
||||
self,
|
||||
data: dict,
|
||||
user_api_key_dict: UserAPIKeyAuth,
|
||||
|
@ -41,6 +41,7 @@ class _ENTERPRISE_OpenAI_Moderation(CustomLogger):
|
|||
"image_generation",
|
||||
"moderation",
|
||||
"audio_transcription",
|
||||
"responses",
|
||||
],
|
||||
):
|
||||
text = ""
|
||||
|
|
|
@ -178,7 +178,7 @@ class AporiaGuardrail(CustomGuardrail):
|
|||
pass
|
||||
|
||||
@log_guardrail_information
|
||||
async def async_moderation_hook( ### 👈 KEY CHANGE ###
|
||||
async def async_moderation_hook(
|
||||
self,
|
||||
data: dict,
|
||||
user_api_key_dict: UserAPIKeyAuth,
|
||||
|
@ -188,6 +188,7 @@ class AporiaGuardrail(CustomGuardrail):
|
|||
"image_generation",
|
||||
"moderation",
|
||||
"audio_transcription",
|
||||
"responses",
|
||||
],
|
||||
):
|
||||
from litellm.proxy.common_utils.callback_utils import (
|
||||
|
|
|
@ -240,7 +240,7 @@ class BedrockGuardrail(CustomGuardrail, BaseAWSLLM):
|
|||
)
|
||||
|
||||
@log_guardrail_information
|
||||
async def async_moderation_hook( ### 👈 KEY CHANGE ###
|
||||
async def async_moderation_hook(
|
||||
self,
|
||||
data: dict,
|
||||
user_api_key_dict: UserAPIKeyAuth,
|
||||
|
@ -250,6 +250,7 @@ class BedrockGuardrail(CustomGuardrail, BaseAWSLLM):
|
|||
"image_generation",
|
||||
"moderation",
|
||||
"audio_transcription",
|
||||
"responses",
|
||||
],
|
||||
):
|
||||
from litellm.proxy.common_utils.callback_utils import (
|
||||
|
|
|
@ -134,6 +134,7 @@ class lakeraAI_Moderation(CustomGuardrail):
|
|||
"audio_transcription",
|
||||
"pass_through_endpoint",
|
||||
"rerank",
|
||||
"responses",
|
||||
],
|
||||
):
|
||||
if (
|
||||
|
@ -335,7 +336,7 @@ class lakeraAI_Moderation(CustomGuardrail):
|
|||
)
|
||||
|
||||
@log_guardrail_information
|
||||
async def async_moderation_hook( ### 👈 KEY CHANGE ###
|
||||
async def async_moderation_hook(
|
||||
self,
|
||||
data: dict,
|
||||
user_api_key_dict: UserAPIKeyAuth,
|
||||
|
@ -345,6 +346,7 @@ class lakeraAI_Moderation(CustomGuardrail):
|
|||
"image_generation",
|
||||
"moderation",
|
||||
"audio_transcription",
|
||||
"responses",
|
||||
],
|
||||
):
|
||||
if self.event_hook is None:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue