Sycophant.Agent.State (sycophant v0.4.2)

Copy Markdown

Internal state for the agent GenStateMachine process.

Summary

Functions

Creates a new State from keyword options, requiring :model.

Types

t()

@type t() :: %Sycophant.Agent.State{
  callbacks: Sycophant.Agent.Callbacks.t(),
  context: Sycophant.Context.t(),
  current_step: non_neg_integer(),
  from: {pid(), term()} | nil,
  last_error: term() | nil,
  max_retries: non_neg_integer(),
  max_steps: pos_integer(),
  model: String.t(),
  opts: keyword(),
  retry_count: non_neg_integer(),
  stats: Sycophant.Agent.Stats.t(),
  stream: (term() -> term()) | {term(), (term(), term() -> term())} | nil,
  task_ref: reference() | nil
}

Functions

new(opts)

@spec new(keyword()) :: {:ok, t()} | {:error, Exception.t()}

Creates a new State from keyword options, requiring :model.