ToolCondition
class ToolCondition<Args : Tool.Args, Result : ToolResult>(val tool: Tool<Args, Result>, val argsCondition: suspend (Args) -> Boolean, val produceResult: suspend (Args) -> Result)(source)
Represents a condition for a tool call and its corresponding result.
This class is used to define how a tool should respond to specific inputs during testing. It encapsulates the tool, a condition to check if the tool call matches, and a function to produce the result when the condition is satisfied.
Parameters
Args
The type of arguments the tool accepts
Result
The type of result the tool produces