fix(embeddings): set FastEmbed embedding_dims from model metadata at init (#4711)

This commit is contained in:
Prithvi Monangi
2026-04-17 05:47:21 -07:00
committed by GitHub
parent 3fbc1c9aef
commit 2ec3c4ab20
+4 -1
View File
@@ -13,7 +13,10 @@ class FastEmbedEmbedding(EmbeddingBase):
super().__init__(config)
self.config.model = self.config.model or "thenlper/gte-large"
self.dense_model = TextEmbedding(model_name = self.config.model)
self.dense_model = TextEmbedding(model_name=self.config.model)
if not self.config.embedding_dims:
self.config.embedding_dims = self.dense_model.embedding_size
def embed(self, text, memory_action: Optional[Literal["add", "search", "update"]] = None):
"""