This commit is contained in:
Timothy J. Baek
2024-04-21 01:22:02 -05:00
parent a41b195f46
commit 8651bec915
2 changed files with 17 additions and 2 deletions

View File

@@ -20,12 +20,13 @@ from starlette.middleware.base import BaseHTTPMiddleware
from apps.ollama.main import app as ollama_app
from apps.openai.main import app as openai_app
from apps.litellm.main import app as litellm_app
from apps.litellm.main import app as litellm_app, start_litellm_background
from apps.audio.main import app as audio_app
from apps.images.main import app as images_app
from apps.rag.main import app as rag_app
from apps.web.main import app as webui_app
import asyncio
from pydantic import BaseModel
from typing import List
@@ -168,6 +169,11 @@ async def check_url(request: Request, call_next):
return response
@app.on_event("startup")
async def on_startup():
asyncio.create_task(start_litellm_background())
app.mount("/api/v1", webui_app)
app.mount("/litellm/api", litellm_app)