mirror of
https://github.com/OpenSPG/KAG.git
synced 2025-06-27 03:20:08 +00:00
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:
parent
6494fd20c0
commit
248b22520f
@ -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)),
|
||||
|
Loading…
x
Reference in New Issue
Block a user