module
Memo::Providers::Base
Overview
Internal provider interface for embedding services
Implementations handle API communication with specific providers (OpenAI, Cohere, etc.) and return embeddings in a standard format.
Direct including types
Defined in:
memo/providers/base.crInstance Method Summary
-
#embed_text(text : String) : Tuple(Array(Float64), Int32)
Embed a single text
-
#embed_texts(texts : Array(String)) : EmbedResult
Embed multiple texts in a batch
Instance Method Detail
abstract
def embed_text(text : String) : Tuple(Array(Float64), Int32)
#
Embed a single text
Returns tuple of (embedding vector, token count)
abstract
def embed_texts(texts : Array(String)) : EmbedResult
#
Embed multiple texts in a batch
Returns EmbedResult with embeddings and token counts