GEPA.StopCondition.Composite (GEPA v0.3.0)

Copy Markdown View Source

Combines multiple stop conditions with AND/OR logic.

Example

composite = %GEPA.StopCondition.Composite{
  conditions: [timeout_condition, budget_condition],
  mode: :any
}

# Stops when ANY condition triggers
should_stop?(composite, state)

Summary

Types

t()

@type t() :: %GEPA.StopCondition.Composite{conditions: [term()], mode: :any | :all}

Functions

new(conditions, mode \\ :any)

@spec new([term()], :any | :all) :: t()

Create a composite stop condition.

Parameters

  • conditions: List of stop condition structs
  • mode: :any (OR logic) or :all (AND logic)

update(condition, state)

@spec update(t(), GEPA.State.t()) :: t()