mirror of
https://github.com/open-webui/open-webui.git
synced 2026-02-24 12:11:56 +01:00
refac
This commit is contained in:
@@ -1344,13 +1344,13 @@ def merge_docs_to_target_size(
|
||||
|
||||
proposed_content = f"{current_content}\n\n{next_chunk.page_content}"
|
||||
|
||||
can_absorb = (
|
||||
can_merge = (
|
||||
can_merge_chunks(current_chunk, next_chunk)
|
||||
and measure_chunk_size(current_content) < min_chunk_size_target
|
||||
and measure_chunk_size(proposed_content) <= max_chunk_size
|
||||
)
|
||||
|
||||
if can_absorb:
|
||||
if can_merge:
|
||||
current_content = proposed_content
|
||||
else:
|
||||
processed_chunks.append(
|
||||
|
||||
Reference in New Issue
Block a user