Skip to content

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

added documentation for api and fixed: duplicate get_dataset() (#1190)

cecilia-uud9a9be4b4cb4
diff --git a/api/apps/dataset_api.py b/api/apps/dataset_api.py
index 94b75fe6a1..09f82e38ef 100644
--- a/api/apps/dataset_api.py
+++ b/api/apps/dataset_api.py
@@ -82,8 +82,8 @@ def create_dataset():
# In case that the length of the name exceeds the limit
dataset_name_length = len(dataset_name)
if dataset_name_length > NAME_LENGTH_LIMIT:
- return construct_json_result(
- message=f"Dataset name: {dataset_name} with length {dataset_name_length} exceeds {NAME_LENGTH_LIMIT}!")
+ return construct_json_result(code=RetCode.DATA_ERROR,
+ message=f"Dataset name: {dataset_name} with length {dataset_name_length} exceeds {NAME_LENGTH_LIMIT}!")
# In case that there are other fields in the data-binary
if len(request_body.keys()) > 1:
@@ -177,11 +177,6 @@ def get_dataset():
return construct_json_result(e)
# ------------------------------ update a dataset --------------------------------------------
[email protected]('/<dataset_id>', methods=['GET'])
-@login_required
-def get_dataset(dataset_id):
- return construct_json_result(code=RetCode.DATA_ERROR, message=f"attempt to get detail of dataset: {dataset_id}")
-
@manager.route('/<dataset_id>', methods=['PUT'])
@login_required
@validate_request("name")