Memo::Providers::Bus
Inherits Memo::Providers::Base < Reference < Object
Bus-based embedding provider.
Routes embedding requests through the Arcana bus to a remote
embedding service (e.g. openai:embed, voyage:embed).
Requires an Arcana::Client to be available — typically set once
at process startup via Memo::Providers::Bus.client = ....
Bus responses don't include per-text token counts, only total_tokens.
We distribute the total evenly across texts (same approach as
Memo::Providers::OpenAI when the API doesn't itemize).
Constants
Constructors
Class methods
Process-wide Arcana::Client used by all Bus providers. Set once at process startup (e.g. in bin/memo-arcana.cr).
Process-wide Arcana::Client used by all Bus providers. Set once at process startup (e.g. in bin/memo-arcana.cr).
Instance methods
Embed a single text
Returns tuple of (embedding vector, token count) input_type: "query" or "document" (used by Voyage AI for optimized embeddings)
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)