Skip to content

RAGFlow is an agent-native database: a Retrieval-Augmented Generation (RAG) engine that grew into context infrastructure.

Refactor:remove use less convert for FastEmbed (#8984)

Stephen Huec21d9a98f01
diff --git a/rag/llm/embedding_model.py b/rag/llm/embedding_model.py
index 98f9bcbc17..9774e7dd98 100644
--- a/rag/llm/embedding_model.py
+++ b/rag/llm/embedding_model.py
@@ -352,8 +352,7 @@ class FastEmbed(DefaultEmbedding):
# Using the internal tokenizer to encode the texts and get the total
# number of tokens
encoding = self._model.model.tokenizer.encode(text)
- embedding = next(self._model.query_embed(text)).tolist()
-
+ embedding = next(self._model.query_embed(text))
return np.array(embedding), len(encoding.ids)