Add graphrag (#1793)

### What problem does this PR solve?

#1594

### Type of change

- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
Kevin Hu
2024-08-02 18:51:14 +08:00
committed by GitHub
parent 80032b1fc0
commit 152072f900
74 changed files with 2522 additions and 105 deletions

View File

@ -273,6 +273,9 @@ def chunk(filename, binary=None, from_page=0, to_page=100000,
raise NotImplementedError(
"file type not supported yet(pdf, xlsx, doc, docx, txt supported)")
if kwargs.get("section_only", False):
return [t for t, _ in sections]
st = timer()
chunks = naive_merge(
sections, int(parser_config.get(