mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 10:44:24 +00:00
add friendli_ai provider
This commit is contained in:
parent
90ae7f040a
commit
fe8d59f5eb
6 changed files with 71 additions and 3 deletions
|
@ -6607,6 +6607,11 @@ def get_llm_provider(
|
|||
or get_secret("TOGETHERAI_API_KEY")
|
||||
or get_secret("TOGETHER_AI_TOKEN")
|
||||
)
|
||||
elif custom_llm_provider == "friendli_ai":
|
||||
api_base = "https://inference.friendli.ai/v1"
|
||||
dynamic_api_key = get_secret("FRIENDLI_AI_API_KEY") or get_secret(
|
||||
"FRIENDLI_TOKEN"
|
||||
)
|
||||
if api_base is not None and not isinstance(api_base, str):
|
||||
raise Exception(
|
||||
"api base needs to be a string. api_base={}".format(api_base)
|
||||
|
@ -6654,6 +6659,11 @@ def get_llm_provider(
|
|||
elif endpoint == "api.deepseek.com/v1":
|
||||
custom_llm_provider = "deepseek"
|
||||
dynamic_api_key = get_secret("DEEPSEEK_API_KEY")
|
||||
elif endpoint == "inference.friendli.ai/v1":
|
||||
custom_llm_provider = "friendli_ai"
|
||||
dynamic_api_key = get_secret(
|
||||
"FRIENDLI_AI_API_KEY"
|
||||
) or get_secret("FRIENDLI_TOKEN")
|
||||
|
||||
if api_base is not None and not isinstance(api_base, str):
|
||||
raise Exception(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue