mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-08-15 21:16:03 +08:00
feat: support entity and topic wiki modes (#18216)
This commit is contained in:
@@ -57,6 +57,8 @@ def validate_template_payload(req: dict, require_all: bool = True) -> str:
|
||||
if len(str((field or {}).get("rule") or "")) > 1024:
|
||||
return f"{section.capitalize()} field rule is too long."
|
||||
if config.get("kind") == "wiki" or req.get("kind") == "wiki":
|
||||
if config.get("mode") not in ("entity", "topic"):
|
||||
return "Wiki mode must be either 'entity' or 'topic'."
|
||||
for field in (config.get("claim") or {}).get("fields") or []:
|
||||
if not str((field or {}).get("statement") or "").strip():
|
||||
return "Claim statement is required."
|
||||
|
||||
Reference in New Issue
Block a user