mirror of
https://github.com/Tencent/WeKnora.git
synced 2025-11-25 03:15:00 +08:00
refactor: remove unnecessary header handling in chunk processing and update example usage
This commit is contained in:
@@ -198,8 +198,6 @@ class TextSplitter(BaseModel, Generic[T]):
|
||||
|
||||
# handle the last chunk
|
||||
assert cur_chunk
|
||||
if cur_headers and cur_len < self.chunk_size:
|
||||
cur_chunk.insert(0, (cur_chunk[0][0], cur_chunk[0][1], cur_headers))
|
||||
chunks.append(
|
||||
(
|
||||
cur_chunk[0][0],
|
||||
|
||||
Reference in New Issue
Block a user