MockLLMAnswerBuilder

A builder class for configuring and managing mocked LLM responses within a MockExecutorBuilder context.

Parameters

mockExecutorBuilder

The parent builder for configuring the mock executor.

response

The mock response to provide based on specified conditions.

Functions

Link copied to clipboard

Sets this response as the default response to be returned when no other response matches.

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

Configures the LLM to respond with this string when the user request satisfies the specified condition.

Link copied to clipboard

Configures the LLM to respond with this string when the user request contains the specified pattern.

Link copied to clipboard

Configures the LLM to respond with this string when the user request exactly matches the specified pattern.