Fix file_path missing in acreate_entity and acreate_relation
This commit is contained in:
@@ -578,8 +578,7 @@ class PGVectorStorage(BaseVectorStorage):
|
||||
"content": item["content"],
|
||||
"content_vector": json.dumps(item["__vector__"].tolist()),
|
||||
"chunk_ids": chunk_ids,
|
||||
"file_path": item["file_path"],
|
||||
# TODO: add document_id
|
||||
"file_path": item.get("file_path", None),
|
||||
}
|
||||
return upsert_sql, data
|
||||
|
||||
@@ -599,8 +598,7 @@ class PGVectorStorage(BaseVectorStorage):
|
||||
"content": item["content"],
|
||||
"content_vector": json.dumps(item["__vector__"].tolist()),
|
||||
"chunk_ids": chunk_ids,
|
||||
"file_path": item["file_path"],
|
||||
# TODO: add document_id
|
||||
"file_path": item.get("file_path", None),
|
||||
}
|
||||
return upsert_sql, data
|
||||
|
||||
|
@@ -502,6 +502,7 @@ async def acreate_entity(
|
||||
"source_id": source_id,
|
||||
"description": description,
|
||||
"entity_type": entity_type,
|
||||
"file_path": entity_data.get("file_path", "manual_creation"),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -607,6 +608,7 @@ async def acreate_relation(
|
||||
"description": description,
|
||||
"keywords": keywords,
|
||||
"weight": weight,
|
||||
"file_path": relation_data.get("file_path", "manual_creation"),
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user