обработка attachments

This commit is contained in:
Егор Кандрушин 2026-04-20 13:18:35 +03:00
parent d89d50245c
commit 353606e8b5
4 changed files with 51 additions and 10 deletions

View file

@ -43,6 +43,6 @@ async def websocket_endpoint(
async def process_message(ws: WebSocket, chat: AgentChat, msg):
match msg:
case MsgUserMessage():
async for chunk in chat.astream(msg.text):
async for chunk in chat.astream(msg.text, msg.attachments):
await ws.send_text(chunk.model_dump_json())
await ws.send_text(MsgEventEnd(tokens_used=0).model_dump_json())