WebSocket endpoint for real-time chat with an agent.
(
websocket: WebSocket,
agent_id: uuid.UUID,
token: str = Query(...),
session_id: str = Query(None),
lang: str = Query("en"),
)
| 225 | |
| 226 | @router.websocket("/ws/chat/{agent_id}") |
| 227 | async def websocket_chat( |
| 228 | websocket: WebSocket, |
| 229 | agent_id: uuid.UUID, |
| 230 | token: str = Query(...), |
| 231 | session_id: str = Query(None), |
| 232 | lang: str = Query("en"), |
| 233 | ): |
| 234 | """WebSocket endpoint for real-time chat with an agent.""" |
| 235 | handler = WebSocketChatHandler(websocket, agent_id, token, session_id, lang) |
| 236 | await handler.run() |
| 237 | |
| 238 | |
| 239 | class WebSocketChatHandler: |
nothing calls this directly
no test coverage detected