Allow related chunks missing in knowledge graph queries

This commit is contained in:
yangdx
2025-10-17 00:19:30 +08:00
parent 0e0b4a94dc
commit 35cd567c9e
2 changed files with 5 additions and 2 deletions

View File

@@ -119,4 +119,3 @@ Before building multi-architecture images, ensure you have:
- Docker 20.10+ with Buildx support
- Sufficient disk space (20GB+ recommended for offline image)
- Registry access credentials (if pushing images)

View File

@@ -3332,7 +3332,11 @@ async def _build_query_context(
query_embedding=search_result["query_embedding"],
)
if not merged_chunks:
if (
not merged_chunks
and not truncation_result["entities_context"]
and not truncation_result["relations_context"]
):
return None
# Stage 4: Build final LLM context with dynamic token processing