mirror of
https://github.com/HKUDS/LightRAG.git
synced 2025-12-12 07:17:48 +00:00
fix: initialize truncated_chunks variable in _build_query_context
Prevents local variable 'truncated_chunks'referenced before assignment
This commit is contained in:
parent
b5682b15cb
commit
f1ff5cf93f
@ -2464,6 +2464,7 @@ async def _build_query_context(
|
||||
|
||||
# Apply token processing to merged chunks
|
||||
text_units_context = []
|
||||
truncated_chunks = []
|
||||
if merged_chunks:
|
||||
# Calculate dynamic token limit for text chunks
|
||||
entities_str = json.dumps(entities_context, ensure_ascii=False)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user