Contents

init(ordered:unordered:allowsAdditionalToolCalls:)

Creates a trajectory expectation with ordered and unordered requirements, and controls whether unmatched tool calls are permitted.

Declaration

init(ordered: [ToolExpectation] = [], unordered: [ToolExpectation] = [], allowsAdditionalToolCalls: Bool = true)

Parameters

  • ordered:

    Steps that must be satisfied in sequential order.

  • unordered:

    Tool calls that must occur at some point, regardless of position.

  • allowsAdditionalToolCalls:

    A Boolean value indicating whether to allow tool calls that don’t match any expectation; defaults to true

Mentioned in

Discussion

Use this initializer when you want to control the blanket policy for unexpected tool calls. To forbid specific tools instead, use init(ordered:unordered:disallowed:).

See Also

Creating multi-tool expectations