feat: image env var

This commit is contained in:
Timothy J. Baek 2024-04-23 06:53:04 -04:00
parent 2d7d6cfffc
commit e3d253b040
2 changed files with 8 additions and 4 deletions

View file

@ -35,8 +35,8 @@ from config import (
ENABLE_IMAGE_GENERATION, ENABLE_IMAGE_GENERATION,
AUTOMATIC1111_BASE_URL, AUTOMATIC1111_BASE_URL,
COMFYUI_BASE_URL, COMFYUI_BASE_URL,
OPENAI_API_BASE_URL, IMAGE_OPENAI_API_BASE_URL,
OPENAI_API_KEY, IMAGE_OPENAI_API_KEY,
) )
@ -58,8 +58,8 @@ app.add_middleware(
app.state.ENGINE = "" app.state.ENGINE = ""
app.state.ENABLED = ENABLE_IMAGE_GENERATION app.state.ENABLED = ENABLE_IMAGE_GENERATION
app.state.OPENAI_API_BASE_URL = OPENAI_API_BASE_URL app.state.OPENAI_API_BASE_URL = IMAGE_OPENAI_API_BASE_URL
app.state.OPENAI_API_KEY = OPENAI_API_KEY app.state.OPENAI_API_KEY = IMAGE_OPENAI_API_KEY
app.state.MODEL = "" app.state.MODEL = ""

View file

@ -487,6 +487,10 @@ AUTOMATIC1111_BASE_URL = os.getenv("AUTOMATIC1111_BASE_URL", "")
COMFYUI_BASE_URL = os.getenv("COMFYUI_BASE_URL", "") COMFYUI_BASE_URL = os.getenv("COMFYUI_BASE_URL", "")
IMAGE_OPENAI_API_BASE_URL = os.getenv("IMAGE_OPENAI_API_BASE_URL", OPENAI_API_BASE_URL)
IMAGE_OPENAI_API_KEY = os.getenv("IMAGE_OPENAI_API_KEY", OPENAI_API_KEY)
#################################### ####################################
# Audio # Audio
#################################### ####################################