mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-08-01 21:37:33 +08:00
Feat: Compilation benefit naive rag. (#17555)
### Summary Compilation benifit naive rag --------- Co-authored-by: Yingfeng Zhang <yingfeng.zhang@gmail.com>
This commit is contained in:
@@ -39,10 +39,10 @@ def _derive_scope(templates: list[dict]) -> str:
|
||||
if not templates:
|
||||
raise GroupValidationError("A template group must contain at least one template.")
|
||||
kinds = [str((t or {}).get("kind") or "").strip() for t in templates]
|
||||
artifact_count = sum(1 for k in kinds if k == "artifacts")
|
||||
artifact_count = sum(1 for k in kinds if k == "wiki")
|
||||
if artifact_count > 0:
|
||||
if artifact_count != 1 or len(templates) != 1:
|
||||
raise GroupValidationError("An artifacts template cannot be combined with other templates in the same group.")
|
||||
raise GroupValidationError("A wiki template cannot be combined with other templates in the same group.")
|
||||
return SCOPE_DATASET
|
||||
|
||||
_enforce_single_rechunk_tree(templates)
|
||||
|
||||
@@ -1225,7 +1225,7 @@ def queue_raptor_o_graphrag_tasks(sample_doc, ty, priority, fake_doc_id="", doc_
|
||||
"graphrag",
|
||||
"raptor",
|
||||
"mindmap",
|
||||
"artifact",
|
||||
"wiki",
|
||||
"skill",
|
||||
# KB-wide structure-graph merge task types (rebuild dataset_graph rows).
|
||||
"structure_graph",
|
||||
|
||||
Reference in New Issue
Block a user