aboutsummaryrefslogtreecommitdiff
path: root/gn3/api
diff options
context:
space:
mode:
authorAlexander_Kabui2024-05-01 02:55:24 +0300
committerAlexander_Kabui2024-05-01 02:55:24 +0300
commitc6a4689b1453978b163058e48c68d28b3e9d87ed (patch)
tree8a8c988b5428b6574a00fbadbf6f9d7b3cb8a879 /gn3/api
parentf5354f287eb417f40ef9011d21e0db5ae65032f9 (diff)
downloadgenenetwork3-c6a4689b1453978b163058e48c68d28b3e9d87ed.tar.gz
Refactoring
*general cleanup for debug code * improve error messaging for successful rating
Diffstat (limited to 'gn3/api')
-rw-r--r--gn3/api/llm.py7
1 files changed, 3 insertions, 4 deletions
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