From 3d2f387bae10ffc35db45304402bb62d8b8959c6 Mon Sep 17 00:00:00 2001 From: Danil Parunin 5f1b81b8-4f5d-11e8-9c2d-fa7ae01bbebc Date: Sat, 6 Dec 2025 15:06:45 +0300 Subject: [PATCH] =?UTF-8?q?=D0=A3=D0=B4=D0=B0=D0=BB=D0=B8=D1=82=D1=8C=20ch?= =?UTF-8?q?at.py?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- chat.py | 13 ------------- 1 file changed, 13 deletions(-) delete mode 100644 chat.py diff --git a/chat.py b/chat.py deleted file mode 100644 index cfec6cb..0000000 --- a/chat.py +++ /dev/null @@ -1,13 +0,0 @@ -from fastapi import APIRouter, HTTPException -from app.models.schemas import ChatRequest, ChatResponse -from app.services.gigachat import call_gigachat - -router = APIRouter() - -@router.post("/chat", response_model=ChatResponse) -async def chat_endpoint(payload: ChatRequest): - try: - reply = await call_gigachat(payload.message, payload.agent.value) - return ChatResponse(reply=reply, agent_used=payload.agent.value) - except Exception as exc: - raise HTTPException(status_code=502, detail=f"GigaChat error: {str(exc)}") \ No newline at end of file