format
format
This commit is contained in:
@@ -536,9 +536,7 @@ def parse_args() -> argparse.Namespace:
|
||||
parser.add_argument(
|
||||
"--namespace-prefix",
|
||||
type=str,
|
||||
default=get_env_value(
|
||||
"NAMESPACE_PREFIX", ""
|
||||
),
|
||||
default=get_env_value("NAMESPACE_PREFIX", ""),
|
||||
help="Prefix of the namespace",
|
||||
)
|
||||
|
||||
|
@@ -298,7 +298,9 @@ class PGKVStorage(BaseKVStorage):
|
||||
async def index_done_callback(self):
|
||||
for n in ("full_docs", "text_chunks"):
|
||||
if self.namespace.endswith(n):
|
||||
logger.info("full doc and chunk data had been saved into postgresql db!")
|
||||
logger.info(
|
||||
"full doc and chunk data had been saved into postgresql db!"
|
||||
)
|
||||
break
|
||||
|
||||
|
||||
|
@@ -190,7 +190,7 @@ class TiDBKVStorage(BaseKVStorage):
|
||||
"tokens": item["tokens"],
|
||||
"chunk_order_index": item["chunk_order_index"],
|
||||
"full_doc_id": item["full_doc_id"],
|
||||
"content_vector": f"{item["__vector__"].tolist()}",
|
||||
"content_vector": f"{item['__vector__'].tolist()}",
|
||||
"workspace": self.db.workspace,
|
||||
}
|
||||
)
|
||||
@@ -297,7 +297,7 @@ class TiDBVectorDBStorage(BaseVectorStorage):
|
||||
"id": item["id"],
|
||||
"name": item["entity_name"],
|
||||
"content": item["content"],
|
||||
"content_vector": f"{item["content_vector"].tolist()}",
|
||||
"content_vector": f"{item['content_vector'].tolist()}",
|
||||
"workspace": self.db.workspace,
|
||||
}
|
||||
# update entity_id if node inserted by graph_storage_instance before
|
||||
@@ -319,7 +319,7 @@ class TiDBVectorDBStorage(BaseVectorStorage):
|
||||
"source_name": item["src_id"],
|
||||
"target_name": item["tgt_id"],
|
||||
"content": item["content"],
|
||||
"content_vector": f"{item["content_vector"].tolist()}",
|
||||
"content_vector": f"{item['content_vector'].tolist()}",
|
||||
"workspace": self.db.workspace,
|
||||
}
|
||||
# update relation_id if node inserted by graph_storage_instance before
|
||||
|
Reference in New Issue
Block a user