Crig::Embeddings::EmbeddingsBuilder(M, T)
Builder for embedding jobs. This is the primary ergonomic surface used by
client.embeddings(...) and client.embeddings_with_ndims(...).
Constructors
empty(model : M) : self
Sourcenew(model : M) : EmptyEmbeddingsBuilder(M) forall M
Start a builder directly from a model when you are not going through a client helper.
Instance methods
Batch convenience helper for the common {id, text} embedding case.
build
Execute embedding requests in model-sized batches and return the resulting embeddings grouped back by original document.
document(document : T) : self
Add a document to be embedded.
The document can be a String or any type that implements the Embed interface.
documents
Sourcemodel
Source