корректная обработка ChatBusyError для WS эндпоинта. Docstring
This commit is contained in:
parent
69ec28037a
commit
58494ddea6
5 changed files with 52 additions and 15 deletions
|
|
@ -2,13 +2,13 @@ from contextlib import asynccontextmanager
|
|||
|
||||
from fastapi import FastAPI
|
||||
|
||||
from src.api.dependencies import get_agent_service
|
||||
from src.api.external import router as ws_router
|
||||
from src.agent import AgentService
|
||||
|
||||
|
||||
@asynccontextmanager
|
||||
async def lifespan(app: FastAPI):
|
||||
get_agent_service()
|
||||
AgentService() # инициализируем синглтон
|
||||
yield
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue