feat: toggleable ollama

This commit is contained in:
Timothy J. Baek
2024-05-21 23:58:42 -07:00
parent af022947be
commit 21ca55dd30
4 changed files with 219 additions and 95 deletions

View File

@@ -384,6 +384,13 @@ if not os.path.exists(LITELLM_CONFIG_PATH):
# OLLAMA_BASE_URL
####################################
ENABLE_OLLAMA_API = PersistentConfig(
"ENABLE_OLLAMA_API",
"ollama.enable",
os.environ.get("ENABLE_OLLAMA_API", "True").lower() == "true",
)
OLLAMA_API_BASE_URL = os.environ.get(
"OLLAMA_API_BASE_URL", "http://localhost:11434/api"
)