Jido.Chat.OptionsLoadError (Jido Chat v1.2.0)

Copy Markdown View Source

Typed error or timeout from a dynamic select option loader.

Summary

Functions

Builds an options-load error from serialized data.

Creates an options-load error.

Returns the schema for an options-load error.

Creates a retryable options-load timeout.

Serializes the options-load error.

Types

t()

@type t() :: %Jido.Chat.OptionsLoadError{
  code: binary(),
  kind: :error | :timeout,
  message: binary(),
  metadata: map(),
  retryable: boolean(),
  timeout_ms: nil | nil | integer()
}

Functions

from_map(map)

@spec from_map(map()) :: t()

Builds an options-load error from serialized data.

new(error)

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

Creates an options-load error.

schema()

Returns the schema for an options-load error.

timeout(timeout_ms, opts \\ [])

@spec timeout(pos_integer(), keyword() | map()) :: t()

Creates a retryable options-load timeout.

to_map(error)

@spec to_map(t()) :: map()

Serializes the options-load error.