MockToolFromCallableReceiver
class MockToolFromCallableReceiver<Result>(callable: KFunction<Result>, builder: MockLLMBuilder)(source)
A class that facilitates mocking of callable tools by defining their behavior based on the received arguments.
Parameters
Result
The type of result produced by the callable
Types
Link copied to clipboard
class MockToolFromCallableResponseBuilder<Result>(callable: KFunction<Result>, action: suspend () -> Result, builder: MockLLMBuilder)
A builder class for setting up mock tool responses based on a callable's behavior.
Functions
Link copied to clipboard
Configures a tool to always execute the provided action whenever it is invoked.
Link copied to clipboard
Configures the tool to always return the specified result when called.
Link copied to clipboard
infix fun does(action: suspend () -> Result): MockToolFromCallableReceiver.MockToolFromCallableResponseBuilder<Result>
Configures a tool to execute the provided suspendable action whenever it is invoked.
Link copied to clipboard
infix fun returns(result: Result): MockToolFromCallableReceiver.MockToolFromCallableResponseBuilder<Result>
Configures the tool to return the specified result when it is invoked.