From 4ed5b3b46d075ac5360aef652fc13269e2b4dde0 Mon Sep 17 00:00:00 2001 From: ishaan-jaff Date: Wed, 29 Nov 2023 19:58:10 -0800 Subject: [PATCH] (chore) linting fix --- litellm/llms/azure.py | 2 +- litellm/llms/openai.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/litellm/llms/azure.py b/litellm/llms/azure.py index bdf2fc661..47ea7c0aa 100644 --- a/litellm/llms/azure.py +++ b/litellm/llms/azure.py @@ -368,7 +368,7 @@ class AzureChatCompletion(BaseLLM): ) - return convert_to_model_response_object(response_object=json.loads(response.model_dump_json()), model_response_object=model_response, response_type="embedding") + return convert_to_model_response_object(response_object=json.loads(response.model_dump_json()), model_response_object=model_response, response_type="embedding") # type: ignore except AzureOpenAIError as e: exception_mapping_worked = True raise e diff --git a/litellm/llms/openai.py b/litellm/llms/openai.py index 3f15e2f69..888f0f008 100644 --- a/litellm/llms/openai.py +++ b/litellm/llms/openai.py @@ -339,7 +339,7 @@ class OpenAIChatCompletion(BaseLLM): openai_aclient = AsyncOpenAI(api_key=api_key, base_url=api_base, http_client=litellm.aclient_session, timeout=timeout, max_retries=max_retries) else: openai_aclient = client - response = await openai_aclient.embeddings.create(**data) + response = await openai_aclient.embeddings.create(**data) # type: ignore return convert_to_model_response_object(response_object=json.loads(response.model_dump_json()), model_response_object=model_response, response_type="embedding") except Exception as e: raise e @@ -368,7 +368,7 @@ class OpenAIChatCompletion(BaseLLM): if not isinstance(max_retries, int): raise OpenAIError(status_code=422, message="max retries must be an int") if aembedding == True: - response = self.aembedding(data=data, model_response=model_response, api_base=api_base, api_key=api_key, timeout=timeout, client=client, max_retries=max_retries) + response = self.aembedding(data=data, model_response=model_response, api_base=api_base, api_key=api_key, timeout=timeout, client=client, max_retries=max_retries) # type: ignore return response if client is None: openai_client = OpenAI(api_key=api_key, base_url=api_base, http_client=litellm.client_session, timeout=timeout, max_retries=max_retries) @@ -391,7 +391,7 @@ class OpenAIChatCompletion(BaseLLM): original_response=response, ) - return convert_to_model_response_object(response_object=json.loads(response.model_dump_json()), model_response_object=model_response, response_type="embedding") + return convert_to_model_response_object(response_object=json.loads(response.model_dump_json()), model_response_object=model_response, response_type="embedding") # type: ignore except OpenAIError as e: exception_mapping_worked = True raise e