The TypeScript SDK supports Hugging Face only through a hosted Text Embeddings Inference (TEI) endpoint, or any OpenAI-compatible Hugging Face endpoint. The local
sentence-transformers mode shown first is Python-only.Usage
Using Text Embeddings Inference (TEI)
You can also use Hugging Face’s Text Embeddings Inference service for faster and more efficient embeddings. This is the mode the TypeScript SDK uses.Config
Here are the parameters available for configuring the Hugging Face embedder:- Python
- TypeScript
| Parameter | Description | Default Value |
|---|---|---|
model | The name of the model to use | multi-qa-MiniLM-L6-cos-v1 |
embedding_dims | Dimensions of the embedding model | selected_model_dimensions |
model_kwargs | Additional arguments for the model | None |
huggingface_base_url | URL to connect to Text Embeddings Inference (TEI) API | None |