Skip to content

Commit d936d56

Browse files
docs: clarify discrepancy in ToolCallPart.part_kind and ToolCallPartDelta.part_delta_kind (#4499)
1 parent 28efeeb commit d936d56

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pydantic_ai_slim/pydantic_ai/messages.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1448,7 +1448,7 @@ class ToolCallPart(BaseToolCallPart):
14481448
_: KW_ONLY
14491449

14501450
part_kind: Literal['tool-call'] = 'tool-call'
1451-
"""Part type identifier, this is available on all parts as a discriminator."""
1451+
"""Part type identifier, this is available on all parts as a discriminator. Note that this is different from `ToolCallPartDelta.part_delta_kind`."""
14521452

14531453

14541454
@dataclass(repr=False)
@@ -1926,7 +1926,7 @@ class ToolCallPartDelta:
19261926
"""
19271927

19281928
part_delta_kind: Literal['tool_call'] = 'tool_call'
1929-
"""Part delta type identifier, used as a discriminator."""
1929+
"""Part delta type identifier, used as a discriminator. Note that this is different from `ToolCallPart.part_kind`."""
19301930

19311931
def as_part(self) -> ToolCallPart | None:
19321932
"""Convert this delta to a fully formed `ToolCallPart` if possible, otherwise return `None`.

0 commit comments

Comments
 (0)