Skip to content

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

remove redeclared get_json_result func (#2675)

yqkcn6f7fcdc8978c
diff --git a/api/utils/api_utils.py b/api/utils/api_utils.py
index c5b93d56f0..0988ff9f9a 100644
--- a/api/utils/api_utils.py
+++ b/api/utils/api_utils.py
@@ -96,26 +96,6 @@ def get_exponential_backoff_interval(retries, full_jitter=False):
return max(0, countdown)
-def get_json_result(retcode=RetCode.SUCCESS, retmsg='success',
- data=None, job_id=None, meta=None):
- result_dict = {
- "retcode": retcode,
- "retmsg": retmsg,
- # "retmsg": re.sub(r"rag", "seceum", retmsg, flags=re.IGNORECASE),
- "data": data,
- "jobId": job_id,
- "meta": meta,
- }
-
- response = {}
- for key, value in result_dict.items():
- if value is None and key != "retcode":
- continue
- else:
- response[key] = value
- return jsonify(response)
-
-
def get_data_error_result(retcode=RetCode.DATA_ERROR,
retmsg='Sorry! Data missing!'):
import re