MockToolFromCallableResponseBuilder

class MockToolFromCallableResponseBuilder<Result>(callable: KFunction<Result>, action: suspend () -> Result, builder: MockLLMBuilder)(source)

A builder class for setting up mock tool responses based on a callable's behavior.

Parameters

callable

The callable (function or method) that the mock tool corresponds to.

action

The action to execute when the mock tool is invoked.

builder

The MockLLMBuilder used to configure and manage the mock tool's behavior.

Constructors

Link copied to clipboard
constructor(callable: KFunction<Result>, action: suspend () -> Result, builder: MockLLMBuilder)

Functions

Link copied to clipboard
fun onArguments(vararg args: Any?)

Configures the mock tool to respond when it is called with the specified arguments.

Link copied to clipboard

Configures a mock behavior for the associated callable to be triggered when the supplied condition is satisfied based on the provided arguments.