This commit is contained in:
Adrian Cole 2025-04-24 14:41:00 +08:00 committed by GitHub
commit e4ca0690d1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
15 changed files with 127 additions and 16 deletions

View file

@ -1521,6 +1521,7 @@ def completion( # type: ignore # noqa: PLR0915
api_base = (
api_base
or litellm.api_base
or get_secret("OPENAI_BASE_URL")
or get_secret("OPENAI_API_BASE")
or "https://api.openai.com/v1"
)
@ -1677,6 +1678,7 @@ def completion( # type: ignore # noqa: PLR0915
api_base = (
api_base # for deepinfra/perplexity/anyscale/groq/friendliai we check in get_llm_provider and pass in the api base from there
or litellm.api_base
or get_secret("OPENAI_BASE_URL")
or get_secret("OPENAI_API_BASE")
or "https://api.openai.com/v1"
)
@ -1730,6 +1732,7 @@ def completion( # type: ignore # noqa: PLR0915
api_base = (
api_base # for deepinfra/perplexity/anyscale/groq/friendliai we check in get_llm_provider and pass in the api base from there
or litellm.api_base
or get_secret("OPENAI_BASE_URL")
or get_secret("OPENAI_API_BASE")
or "https://api.openai.com/v1"
)
@ -3516,6 +3519,7 @@ def embedding( # noqa: PLR0915
api_base = (
api_base
or litellm.api_base
or get_secret_str("OPENAI_BASE_URL")
or get_secret_str("OPENAI_API_BASE")
or "https://api.openai.com/v1"
)
@ -5200,6 +5204,7 @@ def transcription(
api_base = (
api_base
or litellm.api_base
or get_secret("OPENAI_BASE_URL")
or get_secret("OPENAI_API_BASE")
or "https://api.openai.com/v1"
) # type: ignore
@ -5370,6 +5375,7 @@ def speech( # noqa: PLR0915
api_base = (
api_base # for deepinfra/perplexity/anyscale/groq/friendliai we check in get_llm_provider and pass in the api base from there
or litellm.api_base
or get_secret("OPENAI_BASE_URL")
or get_secret("OPENAI_API_BASE")
or "https://api.openai.com/v1"
) # type: ignore