From c6a4689b1453978b163058e48c68d28b3e9d87ed Mon Sep 17 00:00:00 2001 From: Alexander_Kabui Date: Wed, 1 May 2024 02:55:24 +0300 Subject: Refactoring *general cleanup for debug code * improve error messaging for successful rating --- gn3/api/llm.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'gn3/api') diff --git a/gn3/api/llm.py b/gn3/api/llm.py index acbe623..1f96b79 100644 --- a/gn3/api/llm.py +++ b/gn3/api/llm.py @@ -85,12 +85,11 @@ def rating(task_id): weight=excluded.weight """, (str(user_id), query, answer, weight, task_id)) return { - "message": "success", - "status": 0, - "llm_db_path": LLM_DB_PATH + "message": "You have successfully rated this query:Thank you!!", + "status": 0 }, 200 except sqlite3.Error as error: - return jsonify({"error": str(error), "user": token.user.user_id, + return jsonify({"error": str(error), "llm_db_path": LLM_DB_PATH}), 500 except Exception as error: raise error -- cgit v1.2.3