Skip to content
This repository was archived by the owner on Dec 7, 2025. It is now read-only.

Commit a834498

Browse files
Fix v16
1 parent 21f54c1 commit a834498

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

apps/chat/app/api.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
from fastapi import APIRouter, HTTPException, status, Depends
22
from .schemas import ChatRequest, ChatResponse
33
from .services.chat_service import ChatService
4+
import traceback
45

56
api_router = APIRouter(
67
prefix="/api/v1",
@@ -27,4 +28,6 @@ async def chat_endpoint(
2728
reply = await chat_service.get_ai_reply(req.messages, req.user_api_key)
2829
return ChatResponse(reply=reply)
2930
except Exception as e:
30-
raise HTTPException(status_code=500, detail="AI сервис недоступен")
31+
print("Ошибка в chat_endpoint:", e)
32+
traceback.print_exc()
33+
raise HTTPException(status_code=500, detail="AI сервис недоступен")

0 commit comments

Comments
 (0)