From 2ce5de903fb9b5afbc838727d1a3ab9e0d5972af Mon Sep 17 00:00:00 2001 From: Krrish Dholakia Date: Thu, 21 Mar 2024 08:05:47 -0700 Subject: [PATCH] fix: fix linting issue --- enterprise/enterprise_hooks/google_text_moderation.py | 4 +--- enterprise/enterprise_hooks/llama_guard.py | 4 +--- enterprise/enterprise_hooks/llm_guard.py | 4 +--- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/enterprise/enterprise_hooks/google_text_moderation.py b/enterprise/enterprise_hooks/google_text_moderation.py index 7e26f656b..6226e0cff 100644 --- a/enterprise/enterprise_hooks/google_text_moderation.py +++ b/enterprise/enterprise_hooks/google_text_moderation.py @@ -96,9 +96,7 @@ class _ENTERPRISE_GoogleTextModeration(CustomLogger): async def async_moderation_hook( self, data: dict, - call_type: ( - Literal["completion"] | Literal["embeddings"] | Literal["image_generation"] - ), + call_type: Literal["completion", "embeddings", "image_generation"], ): """ - Calls Google's Text Moderation API diff --git a/enterprise/enterprise_hooks/llama_guard.py b/enterprise/enterprise_hooks/llama_guard.py index c80eda972..9509e9c0b 100644 --- a/enterprise/enterprise_hooks/llama_guard.py +++ b/enterprise/enterprise_hooks/llama_guard.py @@ -99,9 +99,7 @@ class _ENTERPRISE_LlamaGuard(CustomLogger): async def async_moderation_hook( self, data: dict, - call_type: ( - Literal["completion"] | Literal["embeddings"] | Literal["image_generation"] - ), + call_type: Literal["completion", "embeddings", "image_generation"], ): """ - Calls the Llama Guard Endpoint diff --git a/enterprise/enterprise_hooks/llm_guard.py b/enterprise/enterprise_hooks/llm_guard.py index 077729d57..d8ea52be5 100644 --- a/enterprise/enterprise_hooks/llm_guard.py +++ b/enterprise/enterprise_hooks/llm_guard.py @@ -95,9 +95,7 @@ class _ENTERPRISE_LLMGuard(CustomLogger): async def async_moderation_hook( self, data: dict, - call_type: ( - Literal["completion"] | Literal["embeddings"] | Literal["image_generation"] - ), + call_type: Literal["completion", "embeddings", "image_generation"], ): """ - Calls the LLM Guard Endpoint