TypeSafeAPISDK (TypeSafeAPISDK v0.1.0)

Copy Markdown View Source

Minimal Elixir client for the TypeSafe System One API.

This package intentionally owns only the provider-specific HTTP/wire surface. Higher-level System One semantics, evaluation workflows, and local inference belong in system_one_sdk and the self-hosted runtime packages.

Summary

Functions

Build a wire-oriented Choice question struct.

List models and raise a normalized SDK error on failure.

Build a wire-oriented Noul question struct.

Build a wire-oriented Score question struct.

Run a System One request and raise a normalized SDK error on failure.

Functions

choice(criteria, opts \\ [])

Build a wire-oriented Choice question struct.

list_models(client, opts \\ [])

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

See TypeSafeAPISDK.Models.list/2.

list_models!(client, opts \\ [])

List models and raise a normalized SDK error on failure.

new_client(opts \\ [])

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

See TypeSafeAPISDK.Client.new/1.

noul(attrs \\ [])

Build a wire-oriented Noul question struct.

score(criteria, opts \\ [])

Build a wire-oriented Score question struct.

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

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

See TypeSafeAPISDK.SystemOne.run/4.

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

Run a System One request and raise a normalized SDK error on failure.

version()

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