Crig::Embeddings::EmptyEmbeddingsBuilder(M)
Empty builder returned by EmbeddingsBuilder.new(model) before the first
document fixes the builder's document type.
Constructors
new(model : M)
SourceInstance methods
all_simple_documents(documents : Enumerable(Tuple(String, String))) : EmbeddingsBuilder(M, Crig::Embeddings::SimpleDocument)
Batch convenience helper for the builder-first simple-document path.
document(document : T) : EmbeddingsBuilder(M, T) forall T
Add a document to be embedded.
The document can be a String or any type that implements the Embed interface.
Add multiple documents to be embedded.
model
Sourcesimple_document(id : String, text : String) : EmbeddingsBuilder(M, Crig::Embeddings::SimpleDocument)
Convenience helper matching Rig's common {id, text} document workflow.