toParallelToolCallsRaw

inline fun <TArgs : Tool.Args, TResult : ToolResult> Flow<TArgs>.toParallelToolCallsRaw(safeTool: SafeTool<TArgs, TResult>, concurrency: Int = 16): Flow<String>(source)

Executes a flow of tool arguments in parallel by invoking the provided tool's raw execution method. Converts each argument in the flow into a string result returned from the tool.

Return

A flow of string results derived from executing the tool's raw method.

Parameters

safeTool

The tool to execute, wrapped in a SafeTool to ensure safety during execution.

concurrency

The maximum number of parallel calls to the tool. Default is 16.


inline fun <TArgs : Tool.Args, TResult : ToolResult> Flow<TArgs>.toParallelToolCallsRaw(toolClass: KClass<out Tool<TArgs, TResult>>, concurrency: Int = 16): Flow<String>(source)

Converts a flow of arguments into a flow of raw string results by executing the corresponding tool calls in parallel.

Return

a flow of raw string results from the parallel tool calls.

Parameters

TArgs

the type of arguments required by the tool.

TResult

the type of result produced by the tool.

toolClass

the class of the tool to be invoked.

concurrency

the number of concurrent tool calls to be executed. Defaults to 16.