addLLMAnswerConditionalMatches

fun <Args> addLLMAnswerConditionalMatches(condition: (String) -> Boolean, tool: Tool<Args, *>, args: Args)(source)

Adds a conditional match for a tool call to the LLM answer processing system. This method associates a condition with a tool and its arguments, allowing conditional execution of the tool when the specified condition matches.

Parameters

condition

A predicate function that takes a string input and returns a Boolean, indicating whether the condition is met.

tool

The tool object to be called if the condition is satisfied.

args

The arguments to be passed to the tool, which will be encoded to a string for the tool call.