class

Memo::Providers::Arcana

Inherits Memo::Providers::Base < Reference < Object

Arcana embedding provider

Wraps Arcana::Embed::Provider to implement the Memo provider interface. Supports any provider Arcana supports (OpenAI, Voyage AI, etc.) with built-in batching and retry.

Constructors

new(provider : ::Arcana::Embed::Provider, model : String = "", dimensions : Int32 | Nil = nil, batch_size : Int32 = 100, max_retries : Int32 = 3)
Source

Instance methods

batch_size
Source
dimensions
Source
embed_text(text : String, input_type : String | Nil = nil) : Tuple(Array(Float64), Int32)

Embed a single text

Returns tuple of (embedding vector, token count) input_type: "query" or "document" (used by Voyage AI for optimized embeddings)

Source
embed_texts(texts : Array(String), input_type : String | Nil = nil) : EmbedResult

Embed multiple texts in a batch

Returns EmbedResult with embeddings and token counts input_type: "query" or "document" (used by Voyage AI for optimized embeddings)

Source
max_retries
Source
model
Source
provider
Source