mirror of
https://github.com/HKUDS/LightRAG.git
synced 2025-07-31 04:41:51 +00:00
Fix linting
This commit is contained in:
parent
00d7bc80bf
commit
7d96ca98f7
@ -2048,9 +2048,7 @@ async def _build_query_context(
|
||||
max_total_tokens = getattr(
|
||||
query_param,
|
||||
"max_total_tokens",
|
||||
text_chunks_db.global_config.get(
|
||||
"max_total_tokens", DEFAULT_MAX_TOTAL_TOKENS
|
||||
),
|
||||
text_chunks_db.global_config.get("max_total_tokens", DEFAULT_MAX_TOTAL_TOKENS),
|
||||
)
|
||||
|
||||
# Truncate entities based on complete JSON serialization
|
||||
@ -2060,9 +2058,7 @@ async def _build_query_context(
|
||||
# Process entities context to replace GRAPH_FIELD_SEP with : in file_path fields
|
||||
for entity in entities_context:
|
||||
if "file_path" in entity and entity["file_path"]:
|
||||
entity["file_path"] = entity["file_path"].replace(
|
||||
GRAPH_FIELD_SEP, ";"
|
||||
)
|
||||
entity["file_path"] = entity["file_path"].replace(GRAPH_FIELD_SEP, ";")
|
||||
|
||||
entities_context = truncate_list_by_token_size(
|
||||
entities_context,
|
||||
|
Loading…
x
Reference in New Issue
Block a user