фикс неправильного создания модели ответа

This commit is contained in:
Егор Кандрушин 2026-04-15 02:28:30 +03:00
parent 69f67a7f42
commit 394249f3c7
3 changed files with 4 additions and 1 deletions

View file

@ -40,5 +40,5 @@ async def process_message(ws: WebSocket, msg, agent_service: AgentService):
match msg:
case MsgUserMessage():
async for chunk in agent_service.astream(msg.text):
await ws.send_text(MsgEventTextChunk(text=chunk).model_dump_json())
await ws.send_text(chunk.model_dump_json())
await ws.send_text(MsgEventEnd(tokens_used=0).model_dump_json())