Jidoka.Memory.Entry (Jidoka v0.9.0)

Copy Markdown View Source

Durable memory entry available to prompt assembly.

Summary

Functions

Normalizes an existing memory entry, keyword list, or map.

Builds a memory entry and applies optional identifier defaults.

Builds a memory entry and raises if the attributes are invalid.

Returns the Zoi schema for a memory entry.

Types

t()

@type t() :: %Jidoka.Memory.Entry{
  agent_id: binary(),
  content: binary(),
  id: binary(),
  metadata: map(),
  session_id: nil | nil | binary()
}

Functions

from_input(input, opts \\ [])

@spec from_input(
  t() | keyword() | map(),
  keyword()
) :: {:ok, t()} | {:error, term()}

Normalizes an existing memory entry, keyword list, or map.

new(attrs, opts \\ [])

@spec new(
  keyword() | map(),
  keyword()
) :: {:ok, t()} | {:error, term()}

Builds a memory entry and applies optional identifier defaults.

new!(attrs, opts \\ [])

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

Builds a memory entry and raises if the attributes are invalid.

schema()

@spec schema() :: Zoi.schema()

Returns the Zoi schema for a memory entry.