SystemOneSDK (SystemOneSDK v0.6.0)

Copy Markdown View Source

Provider-neutral System One semantics with a default hosted TypeSafe adapter.

Use evaluate/4 for validated questions, caller-key preservation and enriched answers, or system_one/4 for the existing wire-oriented parity interface. Execution is selected by the configured client provider: hosted TypeSafe, a generic System One HTTP endpoint, or an inference-side contracts provider.

Summary

Functions

Strict ordered Choice constructor.

Evaluate with caller-key restoration and request-relative answer validation.

Evaluate or raise the normalized SDK error.

Collect the bounded evaluation stream.

Strict Noul constructor. Raises on invalid locally defined questions.

Validate and prepare questions once, returning a tuple.

Validate and prepare questions or raise.

Strict ordered Score constructor.

Legacy wire-oriented system_one call, raising on error.

Functions

choice(instructions, criteria, opts \\ [])

Strict ordered Choice constructor.

evaluate(client, state, questions, opts \\ [])

Evaluate with caller-key restoration and request-relative answer validation.

evaluate!(client, state, questions, opts \\ [])

Evaluate or raise the normalized SDK error.

evaluate_many(client, states, questions, opts \\ [])

Collect the bounded evaluation stream.

evaluate_stream(client, states, questions, opts \\ [])

Lazy, bounded evaluation. See SystemOneSDK.Batch.

list_models(client, opts \\ [])

@spec list_models(SystemOneSDK.Client.t(), keyword()) ::
  {:ok, SystemOneSDK.ListModelsResponse.t()} | {:error, term()}

See SystemOneSDK.Models.list/2.

new_client(opts \\ [])

@spec new_client(keyword()) :: SystemOneSDK.Client.t()

See SystemOneSDK.Client.new/1.

noul(instructions, opts \\ [])

Strict Noul constructor. Raises on invalid locally defined questions.

prepare(questions)

Validate and prepare questions once, returning a tuple.

prepare!(questions)

Validate and prepare questions or raise.

score(instructions, levels, opts \\ [])

Strict ordered Score constructor.

system_one(client, state, questions, opts \\ [])

@spec system_one(SystemOneSDK.Client.t(), term(), map(), keyword()) ::
  {:ok, SystemOneSDK.SystemOneResponse.t()} | {:error, term()}

See SystemOneSDK.SystemOne.run/4.

system_one!(client, state, questions, opts \\ [])

Legacy wire-oriented system_one call, raising on error.

version()

@spec version() :: String.t()