org.llm4s.toolapi.ToolExecutionStrategy
See theToolExecutionStrategy companion object
Strategy for executing multiple tool calls.
When an LLM requests multiple tool calls, they can be executed either sequentially (one at a time) or in parallel (simultaneously).
Attributes
- Example
-
// Execute tools in parallel agent.runWithStrategy( query = "Get weather in London, Paris, and Tokyo", tools = weatherTools, toolExecutionStrategy = ToolExecutionStrategy.Parallel ) // Limit concurrency to 2 at a time agent.runWithStrategy( query = "Search 10 different topics", tools = searchTools, toolExecutionStrategy = ToolExecutionStrategy.ParallelWithLimit(2) ) - Companion
- object
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
In this article