Arcana.Embedder.Custom (Arcana v2.0.1)

Copy Markdown View Source

Custom embedding provider using user-provided functions.

This module wraps a user-provided function to implement the Arcana.Embedder behaviour. It's used internally when configuring a function as the embedder.

Configuration

# Function that returns {:ok, embedding}
config :arcana, embedder: fn text -> {:ok, List.duplicate(0.1, 384)} end

The function must:

  • Accept a single text string
  • Return {:ok, [float()]} or {:error, term()}