feat: direct api settings backend

This commit is contained in:
Timothy Jaeryang Baek
2025-02-11 22:29:45 -08:00
parent 24cbc469cc
commit 3891161173
5 changed files with 147 additions and 10 deletions

View File

@@ -683,6 +683,17 @@ Path(UPLOAD_DIR).mkdir(parents=True, exist_ok=True)
CACHE_DIR = f"{DATA_DIR}/cache"
Path(CACHE_DIR).mkdir(parents=True, exist_ok=True)
####################################
# DIRECT API
####################################
ENABLE_DIRECT_API = PersistentConfig(
"ENABLE_DIRECT_API",
"direct.enable",
os.environ.get("ENABLE_DIRECT_API", "True").lower() == "true",
)
####################################
# OLLAMA_BASE_URL
####################################