forked from phoenix/litellm-mirror
Merge pull request #222 from ErikBjare/dev/openai_api_base
feat: added support for OPENAI_API_BASE
This commit is contained in:
commit
b37f975296
2 changed files with 2 additions and 1 deletions
|
@ -19,4 +19,4 @@ REPLICATE_API_TOKEN = ""
|
|||
# Anthropic
|
||||
ANTHROPIC_API_KEY = ""
|
||||
# Infisical
|
||||
INFISICAL_TOKEN = ""
|
||||
INFISICAL_TOKEN = ""
|
||||
|
|
|
@ -214,6 +214,7 @@ def completion(
|
|||
): # allow user to make an openai call with a custom base
|
||||
openai.api_type = "openai"
|
||||
# note: if a user sets a custom base - we should ensure this works
|
||||
# allow for the setting of dynamic and stateful api-bases
|
||||
api_base = (
|
||||
custom_api_base or litellm.api_base or get_secret("OPENAI_API_BASE") or "https://api.openai.com/v1"
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue