ArnoChen
commited on
Commit
·
f3fa501
1
Parent(s):
e06bbc8
format
Browse files
lightrag/api/lightrag_server.py
CHANGED
@@ -536,9 +536,7 @@ def parse_args() -> argparse.Namespace:
|
|
536 |
parser.add_argument(
|
537 |
"--namespace-prefix",
|
538 |
type=str,
|
539 |
-
default=get_env_value(
|
540 |
-
"NAMESPACE_PREFIX", ""
|
541 |
-
),
|
542 |
help="Prefix of the namespace",
|
543 |
)
|
544 |
|
|
|
536 |
parser.add_argument(
|
537 |
"--namespace-prefix",
|
538 |
type=str,
|
539 |
+
default=get_env_value("NAMESPACE_PREFIX", ""),
|
|
|
|
|
540 |
help="Prefix of the namespace",
|
541 |
)
|
542 |
|
lightrag/kg/postgres_impl.py
CHANGED
@@ -298,7 +298,9 @@ class PGKVStorage(BaseKVStorage):
|
|
298 |
async def index_done_callback(self):
|
299 |
for n in ("full_docs", "text_chunks"):
|
300 |
if self.namespace.endswith(n):
|
301 |
-
logger.info(
|
|
|
|
|
302 |
break
|
303 |
|
304 |
|
|
|
298 |
async def index_done_callback(self):
|
299 |
for n in ("full_docs", "text_chunks"):
|
300 |
if self.namespace.endswith(n):
|
301 |
+
logger.info(
|
302 |
+
"full doc and chunk data had been saved into postgresql db!"
|
303 |
+
)
|
304 |
break
|
305 |
|
306 |
|
lightrag/kg/tidb_impl.py
CHANGED
@@ -190,7 +190,7 @@ class TiDBKVStorage(BaseKVStorage):
|
|
190 |
"tokens": item["tokens"],
|
191 |
"chunk_order_index": item["chunk_order_index"],
|
192 |
"full_doc_id": item["full_doc_id"],
|
193 |
-
"content_vector": f"{item[
|
194 |
"workspace": self.db.workspace,
|
195 |
}
|
196 |
)
|
@@ -297,7 +297,7 @@ class TiDBVectorDBStorage(BaseVectorStorage):
|
|
297 |
"id": item["id"],
|
298 |
"name": item["entity_name"],
|
299 |
"content": item["content"],
|
300 |
-
"content_vector": f"{item[
|
301 |
"workspace": self.db.workspace,
|
302 |
}
|
303 |
# update entity_id if node inserted by graph_storage_instance before
|
@@ -319,7 +319,7 @@ class TiDBVectorDBStorage(BaseVectorStorage):
|
|
319 |
"source_name": item["src_id"],
|
320 |
"target_name": item["tgt_id"],
|
321 |
"content": item["content"],
|
322 |
-
"content_vector": f"{item[
|
323 |
"workspace": self.db.workspace,
|
324 |
}
|
325 |
# update relation_id if node inserted by graph_storage_instance before
|
|
|
190 |
"tokens": item["tokens"],
|
191 |
"chunk_order_index": item["chunk_order_index"],
|
192 |
"full_doc_id": item["full_doc_id"],
|
193 |
+
"content_vector": f"{item['__vector__'].tolist()}",
|
194 |
"workspace": self.db.workspace,
|
195 |
}
|
196 |
)
|
|
|
297 |
"id": item["id"],
|
298 |
"name": item["entity_name"],
|
299 |
"content": item["content"],
|
300 |
+
"content_vector": f"{item['content_vector'].tolist()}",
|
301 |
"workspace": self.db.workspace,
|
302 |
}
|
303 |
# update entity_id if node inserted by graph_storage_instance before
|
|
|
319 |
"source_name": item["src_id"],
|
320 |
"target_name": item["tgt_id"],
|
321 |
"content": item["content"],
|
322 |
+
"content_vector": f"{item['content_vector'].tolist()}",
|
323 |
"workspace": self.db.workspace,
|
324 |
}
|
325 |
# update relation_id if node inserted by graph_storage_instance before
|