feat: openai compatible api support

This commit is contained in:
Timothy J. Baek
2024-01-04 18:38:03 -08:00
parent 5e4dc98f44
commit 17c66fde0f
9 changed files with 260 additions and 85 deletions

View File

@@ -33,7 +33,10 @@ if ENV == "prod":
####################################
OPENAI_API_KEY = os.environ.get("OPENAI_API_KEY", "")
OPENAI_API_BASE_URL = os.environ.get("OPENAI_API_BASE_URL", "https://api.openai.com/v1")
OPENAI_API_BASE_URL = os.environ.get("OPENAI_API_BASE_URL", "")
if OPENAI_API_BASE_URL == "":
OPENAI_API_BASE_URL = "https://api.openai.com/v1"
####################################
# WEBUI_VERSION