Rag.Pipeline.Executor (rag v0.3.4)

View Source

Executes pipeline steps with:

  • Sequential and parallel execution
  • Caching between steps
  • Error handling with retry/halt/continue
  • Telemetry emission

Summary

Functions

Executes a pipeline with the given input.

Types

cache()

@type cache() :: %{required(atom()) => any()}

execution_state()

@type execution_state() :: %{
  pipeline: Rag.Pipeline.t(),
  context: Rag.Pipeline.Context.t(),
  cache: cache(),
  current_result: any()
}

Functions

execute(pipeline, input, opts \\ [])

@spec execute(Rag.Pipeline.t(), any(), keyword()) ::
  {:ok, any(), Rag.Pipeline.Context.t()} | {:error, term()}

Executes a pipeline with the given input.

Returns {:ok, result, context} on success or {:error, reason} on failure.