Skip to content

Commit 2a240a1

Browse files
committed
AgentStateT -> StateT
1 parent f147fad commit 2a240a1

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

python-sdk/ag_ui/core/events.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
from pydantic import Field
99

10-
from .types import ConfiguredBaseModel, Message, AgentStateT, JSONValue
10+
from .types import ConfiguredBaseModel, Message, StateT, JSONValue
1111

1212

1313
class EventType(str, Enum):
@@ -193,13 +193,13 @@ class ThinkingEndEvent(BaseEvent):
193193
type: Literal[EventType.THINKING_END] = EventType.THINKING_END # pyright: ignore[reportIncompatibleVariableOverride]
194194

195195

196-
class StateSnapshotEvent(BaseEvent, Generic[AgentStateT]):
196+
class StateSnapshotEvent(BaseEvent, Generic[StateT]):
197197
"""
198198
Event containing a snapshot of the state.
199199
"""
200200

201201
type: Literal[EventType.STATE_SNAPSHOT] = EventType.STATE_SNAPSHOT # pyright: ignore[reportIncompatibleVariableOverride]
202-
snapshot: AgentStateT
202+
snapshot: StateT
203203

204204

205205
class StateDeltaEvent(BaseEvent):

python-sdk/ag_ui/core/types.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
from pydantic.alias_generators import to_camel
1010

1111
JSONValue = Union[str, int, float, bool, None, dict[str, Any], list[Any]]
12-
AgentStateT = TypeVar("AgentStateT", default=JSONValue, contravariant=True)
12+
StateT = TypeVar("StateT", default=JSONValue, contravariant=True)
1313
FwdPropsT = TypeVar("FwdPropsT", default=JSONValue, contravariant=True)
1414

1515

@@ -127,14 +127,14 @@ class Tool(ConfiguredBaseModel):
127127
parameters: Any # JSON Schema for the tool parameters
128128

129129

130-
class RunAgentInput(ConfiguredBaseModel, Generic[AgentStateT, FwdPropsT]):
130+
class RunAgentInput(ConfiguredBaseModel, Generic[StateT, FwdPropsT]):
131131
"""
132132
Input for running an agent.
133133
"""
134134

135135
thread_id: str
136136
run_id: str
137-
state: AgentStateT
137+
state: StateT
138138
messages: List[Message]
139139
tools: List[Tool]
140140
context: List[Context]

0 commit comments

Comments
 (0)