From dc2c2f229536ea0819de0d5d952314edda4bc712 Mon Sep 17 00:00:00 2001 From: Timothy Jaeryang Baek Date: Sat, 3 Jan 2026 19:48:37 +0400 Subject: [PATCH] refac --- backend/open_webui/routers/retrieval.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/open_webui/routers/retrieval.py b/backend/open_webui/routers/retrieval.py index b6743992fa..cb018471ed 100644 --- a/backend/open_webui/routers/retrieval.py +++ b/backend/open_webui/routers/retrieval.py @@ -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(