MixedResultsReceiver

class MixedResultsReceiver<Args>(toolCalls: List<Pair<Tool<Args, *>, Args>>, responses: List<String>, builder: MockExecutorDSLBuilder)(source)

Represents a class responsible for handling and managing mixed tool call results based on mock responses and predefined configurations.

Type Parameters

Args

The type of tool arguments.

Constructors

Link copied to clipboard
constructor(toolCalls: List<Pair<Tool<Args, *>, Args>>, responses: List<String>, builder: MockExecutorDSLBuilder)

Functions

Link copied to clipboard
infix fun onCondition(condition: (String) -> Boolean)

Configures a conditional response or tool call based on a custom condition provided as a lambda. The condition evaluates user input, and if the condition is satisfied, the associated responses or tool calls are utilized.

Link copied to clipboard
infix fun onRequestContains(pattern: String): String

Configures the system to partially match user requests containing the specified pattern. If the pattern is found within a user request, the associated tool call response will be triggered.

Link copied to clipboard
infix fun onRequestEquals(pattern: String): String

Configures the LLM to respond with a tool call when the user request exactly matches the specified pattern.