Skip to main content
Sentence Transformer Embedder is a class that allows you to embed documents using Hugging Face’s sentence-transformers library, providing access to a wide range of open-source embedding models that can run locally.

Parameters

ParameterTypeDefaultDescription
idstrsentence-transformers/all-MiniLM-L6-v2The name of the SentenceTransformers model to use
dimensionsint384The dimensionality of the generated embeddings
sentence_transformer_clientOptional[SentenceTransformer]NoneOptional pre-configured SentenceTransformers client instance
promptOptional[str]NoneOptional prompt to prepend to input text
normalize_embeddingsboolFalseWhether to normalize returned vectors to have length 1