ExecutionUnit#

class council.controllers.ExecutionUnit(chain: ChainBase, budget: Budget, initial_state: ChatMessage | None = None, name: str | None = None)[source]#

Bases: object

Represents an execution unit to be executed by an Agent

Parameters:
  • chain (ChainBase) – the chain to be executed

  • budget (Budget) – the budget granted for this execution

  • initial_state (Optional[ChatMessage]) – an optional message that will be injected in the chain context

  • name (Optional[str]) – a unique name for the execution. Defaults to Chain.name

property budget: Budget#

The budget for the execution

Return type:

Budget

property chain: ChainBase#

The chain to be executed

Return type:

Chain

property initial_state: ChatMessage | None#

An optional message to put in the chain context

Returns:

Optional[ChatMessage]

property name: str#

Name of the execution unit

Return type:

str