File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed
Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -119,7 +119,6 @@ async def insert(self):
119119 # TODO: configurable whether to use coreference resolution
120120
121121 # Step 2: Split chunks and filter existing ones
122- inserting_chunks = {}
123122 assert isinstance (data , list ) and isinstance (data [0 ], dict )
124123 new_docs = {
125124 compute_content_hash (doc ["content" ], prefix = "doc-" ): {
Original file line number Diff line number Diff line change 33
44from tqdm .asyncio import tqdm as tqdm_async
55
6- from graphgen .models import ChineseRecursiveTextSplitter , RecursiveCharacterSplitter
6+ from graphgen .models import (
7+ ChineseRecursiveTextSplitter ,
8+ RecursiveCharacterSplitter ,
9+ Tokenizer ,
10+ )
711from graphgen .utils import compute_content_hash , detect_main_language
812
913_MAPPING = {
@@ -35,7 +39,7 @@ async def chunk_documents(
3539 new_docs : dict ,
3640 chunk_size : int = 1024 ,
3741 chunk_overlap : int = 100 ,
38- tokenizer_instance = None ,
42+ tokenizer_instance : Tokenizer = None ,
3943 progress_bar = None ,
4044) -> dict :
4145 inserting_chunks = {}
You can’t perform that action at this time.
0 commit comments