Skip to content

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

Fix parameter of calling self.dataStore.get() and warning info during parser (#13068)

qinling02104bc622b4097a
diff --git a/rag/app/table.py b/rag/app/table.py
index 106f06a4c8..f521ab23d6 100644
--- a/rag/app/table.py
+++ b/rag/app/table.py
@@ -304,9 +304,8 @@ class Excel(ExcelParser):
def trans_datatime(s):
try:
return datetime_parse(s.strip()).strftime("%Y-%m-%d %H:%M:%S")
- except Exception as e:
- logging.warning(f"Failed to parse date from {s}, error: {e}")
- pass
+ except Exception:
+ return None
def trans_bool(s):
diff --git a/rag/nlp/search.py b/rag/nlp/search.py
index a36a8d967a..0d9bd096e6 100644
--- a/rag/nlp/search.py
+++ b/rag/nlp/search.py
@@ -627,7 +627,7 @@ class Dealer:
if cid in id2idx:
chunks[id2idx[cid]]["similarity"] += sim
continue
- chunk = self.dataStore.get(cid, idx_nms, kb_ids)
+ chunk = self.dataStore.get(cid, idx_nms[0], kb_ids)
if not chunk:
continue
d = {
@@ -677,7 +677,7 @@ class Dealer:
vector_size = 1024
for id, cks in mom_chunks.items():
- chunk = self.dataStore.get(id, idx_nms, [ck["kb_id"] for ck in cks])
+ chunk = self.dataStore.get(id, idx_nms[0], [ck["kb_id"] for ck in cks])
d = {
"chunk_id": id,
"content_ltks": " ".join([ck["content_ltks"] for ck in cks]),