You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
585 B
Python
21 lines
585 B
Python
from fastapi import FastAPI
|
|
|
|
from app.services.ai.llm_service import LLMService
|
|
|
|
app = FastAPI(title="AI Orquestrador")
|
|
|
|
|
|
@app.on_event("startup")
|
|
async def startup_event():
|
|
"""
|
|
Realiza apenas inicializacao leve do app HTTP legado.
|
|
Bootstrap de banco e seed agora sao operacoes explicitas e separadas.
|
|
"""
|
|
try:
|
|
await LLMService().warmup()
|
|
print("[Startup] LLM warmup concluido.")
|
|
except Exception as e:
|
|
print(f"[Startup] Aviso: falha no warmup do LLM: {e}")
|
|
|
|
print("[Startup] App HTTP legado inicializado sem bootstrap automatico.")
|