fix(builder): fix markdown reader for id (#273)

* fix buidler init

* add pro commit

* rename graphalgoclient to graphclient

* first fix
This commit is contained in:
Xinhong Zhang 2025-01-14 14:36:41 +08:00 committed by GitHub
parent 6494fd20c0
commit 248b22520f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -21,6 +21,7 @@ import requests
from typing import List, Dict
from kag.common.utils import generate_hash_id
from kag.interface import ReaderABC
from kag.builder.model.chunk import Chunk
from kag.interface import LLMClient
@ -299,7 +300,7 @@ class MarkDownReader(ReaderABC):
all_content.extend(child_content)
current_output = Chunk(
id=f"{id}_{len(outputs)}",
id=f"{generate_hash_id(full_title)}",
parent_id=parent_id,
name=full_title,
content="\n".join(filter(None, all_content)),
@ -360,7 +361,7 @@ class MarkDownReader(ReaderABC):
all_content.extend(child_content)
current_output = Chunk(
id=f"{id}_{len(outputs)}",
id=f"{generate_hash_id(full_title)}",
parent_id=parent_id,
name=full_title,
content="\n".join(filter(None, all_content)),