mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-16 23:13:31 +00:00
[Vector Store] Fix function add_texts
in TencentVectorDB
(#24469)
Regardless of whether `embedding_func` is set or not, the 'text' attribute of document should be assigned, otherwise the `page_content` in the document of the final search result will be lost
This commit is contained in:
@@ -375,8 +375,7 @@ class TencentVectorDB(VectorStore):
|
||||
}
|
||||
if embeddings:
|
||||
doc_attrs["vector"] = embeddings[id]
|
||||
else:
|
||||
doc_attrs["text"] = texts[id]
|
||||
doc_attrs["text"] = texts[id]
|
||||
doc_attrs.update(metadata)
|
||||
doc = self.document.Document(**doc_attrs)
|
||||
docs.append(doc)
|
||||
|
Reference in New Issue
Block a user