onCondition

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

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

Return

The response string for method chaining

Parameters

condition

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