mirror of
https://github.com/hwchase17/langchain
synced 2024-11-10 01:10:59 +00:00
community: fix neo4j from_existing_graph (#24912)
Fixes Neo4JVector.from_existing_graph integration with huggingface Previously threw an error with existing databases, because from_existing_graph query returns empty list of new nodes, which are then passed to embedding function, and huggingface errors with empty list. Fixes [24401](https://github.com/langchain-ai/langchain/issues/24401) --------- Co-authored-by: Jeff Katzy <jeffreyerickatz@gmail.com>
This commit is contained in:
parent
d166967003
commit
427a04151c
@ -1449,6 +1449,8 @@ class Neo4jVector(VectorStore):
|
||||
"LIMIT 1000"
|
||||
)
|
||||
data = store.query(fetch_query, params={"props": text_node_properties})
|
||||
if not data:
|
||||
break
|
||||
text_embeddings = embedding.embed_documents([el["text"] for el in data])
|
||||
|
||||
params = {
|
||||
|
Loading…
Reference in New Issue
Block a user