mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-27 03:34:10 +00:00
(feat) native perplexity support
This commit is contained in:
parent
06abb9d146
commit
d4c81814f1
2 changed files with 3 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue