org.llm4s.toolapi.ToolExecutionStrategy
See theToolExecutionStrategy companion trait
object ToolExecutionStrategy
Attributes
- Companion
- trait
- Graph
-
- Supertypes
-
trait Sumtrait Mirrorclass Objecttrait Matchableclass Any
- Self type
Members list
Type members
Classlikes
case object Parallel extends ToolExecutionStrategy
Execute all tools simultaneously.
Execute all tools simultaneously.
Best for independent, IO-bound tools like:
- Multiple API calls
- Database queries
- File operations
Caution: May cause rate limiting with external APIs.
Attributes
- Supertypes
-
trait Singletontrait Producttrait Mirrortrait Serializabletrait Producttrait Equalstrait ToolExecutionStrategyclass Objecttrait Matchableclass AnyShow all
- Self type
-
Parallel.type
final case class ParallelWithLimit(maxConcurrency: Int) extends ToolExecutionStrategy
Execute tools in parallel with a concurrency limit.
Execute tools in parallel with a concurrency limit.
Balances performance with resource constraints. Use when:
- External APIs have rate limits
- System has limited resources
- Want parallel execution but controlled
Value parameters
- maxConcurrency
-
Maximum number of tools executing simultaneously
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait ToolExecutionStrategyclass Objecttrait Matchableclass AnyShow all
case object Sequential extends ToolExecutionStrategy
Execute tools one at a time, in order.
Execute tools one at a time, in order.
This is the safest strategy and the default behavior. Use when:
- Tools have dependencies on each other
- Order of execution matters
- Debugging tool behavior
Attributes
- Supertypes
-
trait Singletontrait Producttrait Mirrortrait Serializabletrait Producttrait Equalstrait ToolExecutionStrategyclass Objecttrait Matchableclass AnyShow all
- Self type
-
Sequential.type
Inherited and Abstract types
The names of the product elements
The names of the product elements
Attributes
- Inherited from:
- Mirror
The name of the type
The name of the type
Attributes
- Inherited from:
- Mirror
Value members
Concrete fields
Default strategy: Sequential execution.
Default strategy: Sequential execution.
Attributes
In this article