From 3a661b209abfb8f205877b99c807fe0eb69f17e4 Mon Sep 17 00:00:00 2001 From: ishaan-jaff Date: Thu, 29 Feb 2024 12:04:16 -0800 Subject: [PATCH] (chore) add mistral azure ai comments --- litellm/utils.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/litellm/utils.py b/litellm/utils.py index a7b68ad12..23feaf2b2 100644 --- a/litellm/utils.py +++ b/litellm/utils.py @@ -5005,15 +5005,17 @@ def get_llm_provider( # mistral is openai compatible, we just need to set this to custom_openai and have the api_base be https://api.mistral.ai api_base = ( api_base - or get_secret("MISTRAL_AZURE_API_BASE") + or get_secret("MISTRAL_AZURE_API_BASE") # for Azure AI Mistral or "https://api.mistral.ai/v1" ) # if api_base does not end with /v1 we add it - if api_base is not None and not api_base.endswith("/v1"): + if api_base is not None and not api_base.endswith( + "/v1" + ): # Mistral always needs a /v1 at the end api_base = api_base + "/v1" dynamic_api_key = ( api_key - or get_secret("MISTRAL_AZURE_API_KEY") + or get_secret("MISTRAL_AZURE_API_KEY") # for Azure AI Mistral or get_secret("MISTRAL_API_KEY") ) elif custom_llm_provider == "voyage":