@@ -87,24 +87,20 @@ class ThinkingTextMessageStartEvent(BaseEvent):
8787 """
8888 Event indicating the start of a thinking text message.
8989 """
90- type : Literal [EventType .THINKING_TEXT_MESSAGE_START ]
90+ type : Literal [EventType .THINKING_TEXT_MESSAGE_START ] = EventType . THINKING_TEXT_MESSAGE_START # pyright: ignore[reportIncompatibleVariableOverride]
9191
9292class ThinkingTextMessageContentEvent (BaseEvent ):
9393 """
9494 Event indicating a piece of a thinking text message.
9595 """
96- type : Literal [EventType .THINKING_TEXT_MESSAGE_CONTENT ]
97- delta : str # This should not be an empty string
98-
99- def model_post_init (self , __context ):
100- if len (self .delta ) == 0 :
101- raise ValueError ("Delta must not be an empty string" )
96+ type : Literal [EventType .THINKING_TEXT_MESSAGE_CONTENT ] = EventType .THINKING_TEXT_MESSAGE_CONTENT # pyright: ignore[reportIncompatibleVariableOverride]
97+ delta : str = Field (min_length = 1 )
10298
10399class ThinkingTextMessageEndEvent (BaseEvent ):
104100 """
105101 Event indicating the end of a thinking text message.
106102 """
107- type : Literal [EventType .THINKING_TEXT_MESSAGE_END ]
103+ type : Literal [EventType .THINKING_TEXT_MESSAGE_END ] = EventType . THINKING_TEXT_MESSAGE_END # pyright: ignore[reportIncompatibleVariableOverride]
108104
109105class ToolCallStartEvent (BaseEvent ):
110106 """
@@ -147,7 +143,7 @@ class ToolCallResultEvent(BaseEvent):
147143 Event containing the result of a tool call.
148144 """
149145 message_id : str
150- type : Literal [EventType .TOOL_CALL_RESULT ]
146+ type : Literal [EventType .TOOL_CALL_RESULT ] = EventType . TOOL_CALL_RESULT # pyright: ignore[reportIncompatibleVariableOverride]
151147 tool_call_id : str
152148 content : str
153149 role : Optional [Literal ["tool" ]] = None
@@ -156,14 +152,14 @@ class ThinkingStartEvent(BaseEvent):
156152 """
157153 Event indicating the start of a thinking step event.
158154 """
159- type : Literal [EventType .THINKING_START ]
155+ type : Literal [EventType .THINKING_START ] = EventType . THINKING_START # pyright: ignore[reportIncompatibleVariableOverride]
160156 title : Optional [str ] = None
161157
162158class ThinkingEndEvent (BaseEvent ):
163159 """
164160 Event indicating the end of a thinking step event.
165161 """
166- type : Literal [EventType .THINKING_END ]
162+ type : Literal [EventType .THINKING_END ] = EventType . THINKING_END # pyright: ignore[reportIncompatibleVariableOverride]
167163
168164class StateSnapshotEvent (BaseEvent ):
169165 """
0 commit comments