mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 10:44:24 +00:00
(fix) deepinfra with openai v1.0.0
This commit is contained in:
parent
cf0ab7155e
commit
27cbd7d895
2 changed files with 5 additions and 55 deletions
|
@ -1992,6 +1992,11 @@ def get_llm_provider(model: str, custom_llm_provider: Optional[str] = None, api_
|
|||
api_base = "https://api.endpoints.anyscale.com/v1"
|
||||
dynamic_api_key = os.getenv("ANYSCALE_API_KEY")
|
||||
custom_llm_provider = "custom_openai"
|
||||
elif custom_llm_provider == "deepinfra":
|
||||
# deepinfra is openai compatible, we just need to set this to custom_openai and have the api_base be https://api.endpoints.anyscale.com/v1
|
||||
api_base = "https://api.deepinfra.com/v1/openai"
|
||||
dynamic_api_key = os.getenv("DEEPINFRA_API_KEY")
|
||||
custom_llm_provider = "custom_openai"
|
||||
return model, custom_llm_provider, dynamic_api_key, api_base
|
||||
|
||||
# check if api base is a known openai compatible endpoint
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue