Skip to content

Commit 191d651

Browse files
authored
docs: add API reference to UserPromptNode (#2052)
1 parent ea65d87 commit 191d651

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

pydantic_ai_slim/pydantic_ai/_agent_graph.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,8 @@ def is_agent_node(
141141

142142
@dataclasses.dataclass
143143
class UserPromptNode(AgentNode[DepsT, NodeRunEndT]):
144+
"""The node that handles the user prompt and instructions."""
145+
144146
user_prompt: str | Sequence[_messages.UserContent] | None
145147

146148
instructions: str | None
@@ -293,7 +295,7 @@ async def add_mcp_server_tools(server: MCPServer) -> None:
293295

294296
@dataclasses.dataclass
295297
class ModelRequestNode(AgentNode[DepsT, NodeRunEndT]):
296-
"""Make a request to the model using the last message in state.message_history."""
298+
"""The node that makes a request to the model using the last message in state.message_history."""
297299

298300
request: _messages.ModelRequest
299301

@@ -412,7 +414,7 @@ def _finish_handling(
412414

413415
@dataclasses.dataclass
414416
class CallToolsNode(AgentNode[DepsT, NodeRunEndT]):
415-
"""Process a model response, and decide whether to end the run or make a new request."""
417+
"""The node that processes a model response, and decides whether to end the run or make a new request."""
416418

417419
model_response: _messages.ModelResponse
418420

0 commit comments

Comments
 (0)