addLLMAnswerPartialPattern

fun <Args : ToolArgs> addLLMAnswerPartialPattern(pattern: String, tool: Tool<Args, *>, args: Args)(source)

Adds a partial pattern match for an LLM answer that triggers a tool call.

Parameters

pattern

The exact input string to match

tool

The tool to be called when the input matches

args

The arguments to pass to the tool


fun <Args : ToolArgs> addLLMAnswerPartialPattern(pattern: String, toolCalls: List<Pair<Tool<Args, *>, Args>>)(source)

Adds a partial pattern match for an LLM answer that triggers a set of tool calls.

Parameters

pattern

The substring pattern to partially match in the user request.

toolCalls

A list of pairs, where each pair consists of a tool and the arguments to pass to the tool. These tool calls will be triggered when the input matches the pattern.


fun <Args : ToolArgs> addLLMAnswerPartialPattern(pattern: String, toolCalls: List<Pair<Tool<Args, *>, Args>>, responses: List<String>)(source)

Adds a partial pattern match for an LLM answer that triggers a set of tool calls with predefined responses.

Parameters

pattern

The substring pattern to partially match in the user request.

toolCalls

A list of tool call and argument pairs to be triggered when the input matches.

responses

A list of response strings corresponding to each tool call.