struct

Crig::Embeddings::EmptyEmbeddingsBuilder(M)

Inherits Struct < Value < Object

Empty builder returned by EmbeddingsBuilder.new(model) before the first document fixes the builder's document type.

Constructors

new(model : M)
Source

Instance methods

all_simple_documents(documents : Enumerable(Tuple(String, String))) : EmbeddingsBuilder(M, Crig::Embeddings::SimpleDocument)

Batch convenience helper for the builder-first simple-document path.

Source
build

Build an empty embeddings set, matching Rust's empty-builder behavior.

Source
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.

Source
documents(documents : Enumerable(T)) : EmbeddingsBuilder(M, T) forall T

Add multiple documents to be embedded.

Source
model
Source
simple_document(id : String, text : String) : EmbeddingsBuilder(M, Crig::Embeddings::SimpleDocument)

Convenience helper matching Rig's common {id, text} document workflow.

Source