The agent engineering platform.
Python agentsaiai-agentsanthropicchatgptdeepagentsenterpriseframeworkgeminigenerative-ailangchainlanggraphllmmultiagentopen-sourceopenaipydanticpythonragtypescript
community[patch]: apply embedding functions during query if defined (#16646)
Rashedul Hasan Rijul481493dbce6e
diff --git a/libs/community/langchain_community/vectorstores/bageldb.py b/libs/community/langchain_community/vectorstores/bageldb.pyindex fee0cdf1f9..a7b9ddc47d 100644--- a/libs/community/langchain_community/vectorstores/bageldb.py+++ b/libs/community/langchain_community/vectorstores/bageldb.py@@ -109,6 +109,12 @@ class Bagel(VectorStore):import bagel # noqa: F401except ImportError:raise ImportError("Please install bagel `pip install betabageldb`.")++ if self._embedding_function and query_embeddings is None and query_texts:+ texts = list(query_texts)+ query_embeddings = self._embedding_function.embed_documents(texts)+ query_texts = None+return self._cluster.find(query_texts=query_texts,query_embeddings=query_embeddings,