ToolExecutionStrategy

org.llm4s.toolapi.ToolExecutionStrategy
See theToolExecutionStrategy companion trait

Attributes

Companion
trait
Graph
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class 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 Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show 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 Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show 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 Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
Self type
Sequential.type

Inherited and Abstract types

type MirroredElemLabels <: Tuple

The names of the product elements

The names of the product elements

Attributes

Inherited from:
Mirror
type MirroredLabel <: String

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