Skip to content

RAGFlow is an agent-native database: a Retrieval-Augmented Generation (RAG) engine that grew into context infrastructure.

Fix:When you create a new API module named xxxa_api, the access route will become xxx instead of xxxa. For example, when I create a new API module named 'data_api', the access route will become 'dat' instead of 'data (#7325)

donblack01115850945e98
diff --git a/api/apps/__init__.py b/api/apps/__init__.py
index 348eb91ced..7acef9be5b 100644
--- a/api/apps/__init__.py
+++ b/api/apps/__init__.py
@@ -107,7 +107,7 @@ def search_pages_path(pages_dir):
def register_page(page_path):
path = f"{page_path}"
- page_name = page_path.stem.rstrip("_app")
+ page_name = page_path.stem.removesuffix("_app")
module_name = ".".join(
page_path.parts[page_path.parts.index("api"): -1] + (page_name,)
)
diff --git a/api/apps/kb_app.py b/api/apps/kb_app.py
index 4758f8222d..3267c80601 100644
--- a/api/apps/kb_app.py
+++ b/api/apps/kb_app.py
@@ -58,6 +58,7 @@ def create():
status=StatusEnum.VALID.value)
try:
req["id"] = get_uuid()
+ req["name"] = dataset_name
req["tenant_id"] = current_user.id
req["created_by"] = current_user.id
e, t = TenantService.get_by_id(current_user.id)