View Source Agens.Job.Config (agens v0.2.0)
The Config struct defines the static shape of a Job.
Fields
:id- The unique identifier of the Job.:description- An optional string added to the LM prompt that describes the goal of the Job.:nodes- A map ofnode_id => Agens.Job.Nodedefining the workflow nodes.:starting_node_id- The id of the Node that runs first when the Job is started.:outputs- Optional output specification used when extracting structured data from the final Serving result.:max_retries- Maximum retry attempts per Node before the Job errors out. Defaults to3.
Summary
Functions
Builds a Agens.Job.Config from a JSON string.
Builds a Agens.Job.Config from a decoded map.
Validates a Agens.Job.Config. Raises ArgumentError on the first invariant
violation. Currently enforces that every Node declares a non-nil :serving.
Types
@type t() :: %Agens.Job.Config{ description: String.t() | nil, id: binary(), max_retries: non_neg_integer(), nodes: %{required(binary()) => Agens.Job.Node.t()}, outputs: keyword() | nil, starting_node_id: binary() }
Functions
Builds a Agens.Job.Config from a JSON string.
Delegates to from_map/1 after decoding with Jason.
Builds a Agens.Job.Config from a decoded map.
String keys are expected. Each entry under "nodes" is converted via Agens.Job.Node.from_map/1.
Validates a Agens.Job.Config. Raises ArgumentError on the first invariant
violation. Currently enforces that every Node declares a non-nil :serving.