Inference.Client (inference v0.1.0)

Copy Markdown View Source

Adapter client configuration.

Summary

Functions

Validates that the configured adapter reports an explicitly admitted kind.

Types

t()

@type t() :: %Inference.Client{
  adapter: module(),
  adapter_opts: keyword(),
  admitted_kinds: [Inference.Adapter.provider_kind()],
  authority: map() | nil,
  backend: atom() | nil,
  capabilities: list(),
  defaults: keyword(),
  metadata: map(),
  model: String.t() | nil,
  provider: atom() | nil
}

Functions

new(attrs)

@spec new(keyword() | map()) :: {:ok, t()} | {:error, Inference.Error.t()}

new!(attrs)

@spec new!(keyword() | map()) :: t()

validate_adapter_kind(client)

@spec validate_adapter_kind(t()) :: :ok | {:error, Inference.Error.t()}

Validates that the configured adapter reports an explicitly admitted kind.