File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
pydantic_ai_slim/pydantic_ai Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -49,6 +49,8 @@ class RunContext(Generic[AgentDepsT]):
49
49
"""The original user prompt passed to the run."""
50
50
messages : list [_messages .ModelMessage ] = field (default_factory = list )
51
51
"""Messages exchanged in the conversation so far."""
52
+ tool_call_id : str | None = None
53
+ """The ID of the tool call."""
52
54
tool_name : str | None = None
53
55
"""Name of the tool being called."""
54
56
retry : int = 0
@@ -301,7 +303,12 @@ def _call_args(
301
303
if self ._single_arg_name :
302
304
args_dict = {self ._single_arg_name : args_dict }
303
305
304
- ctx = dataclasses .replace (run_context , retry = self .current_retry , tool_name = message .tool_name )
306
+ ctx = dataclasses .replace (
307
+ run_context ,
308
+ retry = self .current_retry ,
309
+ tool_name = message .tool_name ,
310
+ tool_call_id = message .tool_call_id ,
311
+ )
305
312
args = [ctx ] if self .takes_ctx else []
306
313
for positional_field in self ._positional_fields :
307
314
args .append (args_dict .pop (positional_field ))
You can’t perform that action at this time.
0 commit comments