mirror of
https://github.com/hwchase17/langchain
synced 2024-11-20 03:25:56 +00:00
community[patch]: jaguar vector store fix integer-element error when joining metadata values (#15939)
- **Description:** some document loaders add integer-type metadata values which cause error - **Issue:** 15937 - **Dependencies:** none --------- Co-authored-by: JY <jyjy@jaguardb>
This commit is contained in:
parent
7306032dcf
commit
b11fd3bedc
@ -158,6 +158,7 @@ class Jaguar(VectorStore):
|
|||||||
"""
|
"""
|
||||||
vcol = self._vector_index
|
vcol = self._vector_index
|
||||||
filecol = kwargs.get("file_column", "")
|
filecol = kwargs.get("file_column", "")
|
||||||
|
text_tag = kwargs.get("text_tag", "")
|
||||||
podstorevcol = self._pod + "." + self._store + "." + vcol
|
podstorevcol = self._pod + "." + self._store + "." + vcol
|
||||||
q = "textcol " + podstorevcol
|
q = "textcol " + podstorevcol
|
||||||
js = self.run(q)
|
js = self.run(q)
|
||||||
@ -165,6 +166,12 @@ class Jaguar(VectorStore):
|
|||||||
return []
|
return []
|
||||||
textcol = js["data"]
|
textcol = js["data"]
|
||||||
|
|
||||||
|
if text_tag != "":
|
||||||
|
tag_texts = []
|
||||||
|
for t in texts:
|
||||||
|
tag_texts.append(text_tag + " " + t)
|
||||||
|
texts = tag_texts
|
||||||
|
|
||||||
embeddings = self._embedding.embed_documents(list(texts))
|
embeddings = self._embedding.embed_documents(list(texts))
|
||||||
ids = []
|
ids = []
|
||||||
if metadatas is None:
|
if metadatas is None:
|
||||||
@ -444,4 +451,5 @@ class Jaguar(VectorStore):
|
|||||||
nvec.append(k)
|
nvec.append(k)
|
||||||
vvec.append(v)
|
vvec.append(v)
|
||||||
|
|
||||||
return nvec, vvec, filepath
|
vvec_s = [str(e) for e in vvec]
|
||||||
|
return nvec, vvec_s, filepath
|
||||||
|
Loading…
Reference in New Issue
Block a user