From 0c199340083536e36f0fb27b373c695fc30ed06e Mon Sep 17 00:00:00 2001 From: collhoun <2904yr@mail.ru> Date: Tue, 31 Mar 2026 11:04:11 +0300 Subject: [PATCH] =?UTF-8?q?#5=20bug=20fix:=20=D0=98=D1=81=D0=BF=D1=80?= =?UTF-8?q?=D0=B0=D0=B2=D0=BB=D0=B5=D0=BD=20=D0=B1=D0=B0=D0=B3=20=D1=81=20?= =?UTF-8?q?=D0=BE=D0=B1=D1=80=D0=B0=D0=B1=D0=BE=D1=82=D0=BA=D0=BE=D0=B9=20?= =?UTF-8?q?=D1=82=D0=B8=D0=BF=D0=BE=D0=B2=20pydantic?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/models.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/api/models.py b/api/models.py index 110751a..f9d88a3 100644 --- a/api/models.py +++ b/api/models.py @@ -100,8 +100,17 @@ class SM: type: Literal[SM.Type.GRACEFUL_DISCONNECT] +AgentEventUnion = Annotated[ + Union[ + SM.EventTextChunk, + SM.EventEnd, + ], + Field(discriminator="subtype") +] + + ServerMessage = Annotated[ - Union[SM.Status, SM.AgentEvent, SM.Error, SM.GracefulDisconnect], + Union[SM.Status, AgentEventUnion, SM.Error, SM.GracefulDisconnect], Field(discriminator="type") ] """