#5 bug fix: Исправлен баг с обработкой типов pydantic
This commit is contained in:
parent
42c6571d3a
commit
0c19934008
1 changed files with 10 additions and 1 deletions
|
|
@ -100,8 +100,17 @@ class SM:
|
||||||
type: Literal[SM.Type.GRACEFUL_DISCONNECT]
|
type: Literal[SM.Type.GRACEFUL_DISCONNECT]
|
||||||
|
|
||||||
|
|
||||||
|
AgentEventUnion = Annotated[
|
||||||
|
Union[
|
||||||
|
SM.EventTextChunk,
|
||||||
|
SM.EventEnd,
|
||||||
|
],
|
||||||
|
Field(discriminator="subtype")
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
ServerMessage = Annotated[
|
ServerMessage = Annotated[
|
||||||
Union[SM.Status, SM.AgentEvent, SM.Error, SM.GracefulDisconnect],
|
Union[SM.Status, AgentEventUnion, SM.Error, SM.GracefulDisconnect],
|
||||||
Field(discriminator="type")
|
Field(discriminator="type")
|
||||||
]
|
]
|
||||||
"""
|
"""
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue