onCondition

infix fun onCondition(condition: (String) -> Boolean): MockExecutorBuilder(source)

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

Return

The updated MockLLMAnswerBuilder instance for method chaining.

Parameters

condition

A function that evaluates the user request and returns true if it matches