(feat) native perplexity support

This commit is contained in:
ishaan-jaff 2023-10-20 14:26:46 -07:00
parent 06abb9d146
commit d4c81814f1
2 changed files with 3 additions and 2 deletions

View file

@ -263,7 +263,7 @@ def completion(
if deployment_id != None: # azure llms
model=deployment_id
custom_llm_provider="azure"
model, custom_llm_provider, dynamic_api_key = get_llm_provider(model=model, custom_llm_provider=custom_llm_provider, api_base=api_base)
model, custom_llm_provider, dynamic_api_key, api_base = get_llm_provider(model=model, custom_llm_provider=custom_llm_provider, api_base=api_base)
model_api_key = get_api_key(llm_provider=custom_llm_provider, dynamic_api_key=api_key) # get the api key from the environment if required for the model
if model_api_key and "sk-litellm" in model_api_key:
api_base = "https://proxy.litellm.ai"
@ -1497,7 +1497,7 @@ def embedding(
Raises:
- exception_type: If an exception occurs during the API call.
"""
model, custom_llm_provider, dynamic_api_key = get_llm_provider(model, custom_llm_provider)
model, custom_llm_provider, dynamic_api_key, api_base = get_llm_provider(model, custom_llm_provider)
try:
response = None
logging = litellm_logging_obj