Skip to main content
HuggingfaceCustomEmbedder defaults to intfloat/multilingual-e5-large. Set dimensions=1024 so Agno records that model’s expected vector width.
huggingface_embedder.py
The default E5 model expects passage: for indexed passages and query: for retrieval queries. HuggingfaceCustomEmbedder does not add these prefixes. Add them before calling the embedder. The adapter also returns the feature-extraction response without pooling or flattening it. Confirm that your endpoint returns one flat vector before using it with a vector database.
The dimensions field does not request pooling or a specific output size from Hugging Face. It configures the expected width used by Agno’s vector database integrations.

Run the Example

1

Set up your virtual environment

2

Export the API key

3

Install dependencies

4

Run the example

Developer Resources