DefaultEmbeddingFunction
class DefaultEmbeddingFunction implements IEmbeddingFunction { }
constructor({ model, revision, quantized, progress_callback }?: {
model?: string;
revision?: string;
quantized?: boolean;
progress_callback?: Function | null;
});private loadClient;
private model;
private pipelinePromise?;
private progress_callback;
private quantized;
private revision;
private transformersApi;
generate(texts: string[]): Promise<number[][]>;
static import(): Promise<{
pipeline: chromadb_default_embed;
}>;§Implements
§Constructors
§
new DefaultEmbeddingFunction({ model, revision, quantized, progress_callback }?: {
[src]model?: string;
revision?: string;
quantized?: boolean;
progress_callback?: Function | null;
})DefaultEmbeddingFunction constructor.
@param options
The configuration options.
@param options.model
The model to use to calculate embeddings. Defaults to 'Xenova/all-MiniLM-L6-v2', which is an ONNX port of sentence-transformers/all-MiniLM-L6-v2.
@param options.revision
The specific model version to use (can be a branch, tag name, or commit id). Defaults to 'main'.
@param options.quantized
Whether to load the 8-bit quantized version of the model. Defaults to false.
@param options.progress_callback
If specified, this function will be called during model construction, to provide the user with progress updates.