mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
Refactor Chat API (#2804)
### What problem does this PR solve? Refactor Chat API ### Type of change - [x] Refactoring --------- Co-authored-by: liuhua <10215101452@stu.ecun.edu.cn>
This commit is contained in:
@ -279,8 +279,8 @@ def get_result(retcode=RetCode.SUCCESS, retmsg='error', data=None):
|
||||
response = {"code": retcode, "message": retmsg}
|
||||
return jsonify(response)
|
||||
|
||||
def get_error_data_result(retcode=RetCode.DATA_ERROR,
|
||||
retmsg='Sorry! Data missing!'):
|
||||
def get_error_data_result(retmsg='Sorry! Data missing!',retcode=RetCode.DATA_ERROR,
|
||||
):
|
||||
import re
|
||||
result_dict = {
|
||||
"code": retcode,
|
||||
@ -295,5 +295,4 @@ def get_error_data_result(retcode=RetCode.DATA_ERROR,
|
||||
continue
|
||||
else:
|
||||
response[key] = value
|
||||
return jsonify(response)
|
||||
|
||||
return jsonify(response)
|
||||
Reference in New Issue
Block a user