Typed System One response with grouped convenience accessors.
Responses produced by the HTTP client retain request metadata separately from
the decoded API payload. request_id!/1 and raw_http_response!/1 mirror the
Python SDK's metadata access without polluting the wire fields.
Summary
Functions
Fetch an answer using its exact caller key (or wire key for system_one).
Fetch an answer or raise a KeyError listing the available IDs.
Types
@type answer() :: SystemOneSDK.NoulAnswer.t() | SystemOneSDK.ChoiceAnswer.t() | SystemOneSDK.ScoreAnswer.t()
@type t() :: %SystemOneSDK.SystemOneResponse{ answers: %{required(atom() | String.t()) => answer()}, batch_index: non_neg_integer() | nil, elapsed_ms: number(), model: String.t(), prepared_fingerprint: String.t() | nil, raw: map() | nil, raw_http_response: Pristine.Response.t() | nil, request_id: String.t() | nil, retries: non_neg_integer(), runtime_elapsed_ms: number() | nil, unknown_answers: map(), usage: SystemOneSDK.Usage.t() }
Functions
@spec choices(t()) :: %{ required(atom() | String.t()) => SystemOneSDK.ChoiceAnswer.t() }
@spec decode(term()) :: {:ok, t()} | {:error, SystemOneSDK.Error.t()}
Fetch an answer using its exact caller key (or wire key for system_one).
Fetch an answer or raise a KeyError listing the available IDs.
@spec nouls(t()) :: %{required(atom() | String.t()) => SystemOneSDK.NoulAnswer.t()}
@spec raw_http_response!(t()) :: Pristine.Response.t()
@spec scores(t()) :: %{required(atom() | String.t()) => SystemOneSDK.ScoreAnswer.t()}