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

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

1
.gitignore vendored
View file

@ -1,4 +1,5 @@
.idea/
workspace/
# Byte-compiled / optimized / DLL files
__pycache__/

View file

@ -13,6 +13,8 @@ services:
build:
context: .
target: development
tags:
- mrkan0/lambda-agent:dev
additional_contexts:
agent_api: ${AGENT_API_PATH}
volumes:

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())