Create a `ToolCall` efficiency assertion. Args: name: Expected tool name. step: Optional 1-indexed step to restrict the search to. args_contains: If set, the tool call args must contain these key-value pairs. args_equals: If set, the tool call args must equal thi
(
name: str,
*,
step: int | None = None,
args_contains: dict[str, object] | None = None,
args_equals: dict[str, object] | None = None,
)
| 905 | |
| 906 | |
| 907 | def tool_call( |
| 908 | name: str, |
| 909 | *, |
| 910 | step: int | None = None, |
| 911 | args_contains: dict[str, object] | None = None, |
| 912 | args_equals: dict[str, object] | None = None, |
| 913 | ) -> ToolCall: |
| 914 | """Create a `ToolCall` efficiency assertion. |
| 915 | |
| 916 | Args: |
| 917 | name: Expected tool name. |
| 918 | step: Optional 1-indexed step to restrict the search to. |
| 919 | args_contains: If set, the tool call args must contain these key-value pairs. |
| 920 | args_equals: If set, the tool call args must equal this dict exactly. |
| 921 | |
| 922 | Returns: |
| 923 | A `ToolCall` assertion instance. |
| 924 | """ |
| 925 | return ToolCall( |
| 926 | name=name, |
| 927 | step=step, |
| 928 | args_contains=args_contains, |
| 929 | args_equals=args_equals, |
| 930 | ) |
| 931 | |
| 932 | |
| 933 | # --------------------------------------------------------------------------- |
searching dependent graphs…