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