From de0084c8df777390704c21670dde216085ef7101 Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Thu, 22 Feb 2024 03:22:23 -0800 Subject: [PATCH] feat: litellm integration --- backend/main.py | 4 ++++ backend/requirements.txt | 2 ++ 2 files changed, 6 insertions(+) diff --git a/backend/main.py b/backend/main.py index d1fb0c20..2ec741b0 100644 --- a/backend/main.py +++ b/backend/main.py @@ -8,6 +8,8 @@ from fastapi.middleware.cors import CORSMiddleware from starlette.exceptions import HTTPException as StarletteHTTPException +from litellm.proxy.proxy_server import app as litellm_app + from apps.ollama.main import app as ollama_app from apps.openai.main import app as openai_app from apps.audio.main import app as audio_app @@ -54,6 +56,8 @@ async def check_url(request: Request, call_next): app.mount("/api/v1", webui_app) +app.mount("/litellm/api", litellm_app) + app.mount("/ollama/api", ollama_app) app.mount("/openai/api", openai_app) diff --git a/backend/requirements.txt b/backend/requirements.txt index 56e1d36e..75d368d8 100644 --- a/backend/requirements.txt +++ b/backend/requirements.txt @@ -16,6 +16,8 @@ aiohttp peewee bcrypt +litellm[proxy] + langchain langchain-community chromadb