shell knowledge commands

This commit is contained in:
tsukasa
2023-09-21 18:32:17 +08:00
parent edbd1c41da
commit a0a45b8998
11 changed files with 409 additions and 74 deletions
+2 -2
View File
@@ -49,7 +49,7 @@ class DocumentObjectBuilder:
self.text = text
return self
def build(self, relation_store: ObjectRelationStore) -> DocumentObject:
def build(self) -> DocumentObject:
chunk_list = KnowledgeStore().get_chunk_list_writer().create_chunk_list_from_text(
self.text,
1024 * 4,
@@ -60,6 +60,6 @@ class DocumentObjectBuilder:
# Add relation to store
for chunk_id in chunk_list.chunk_list:
relation_store.add_relation(chunk_id, doc_id)
KnowledgeStore().get_relation_store().add_relation(chunk_id, doc_id)
return doc