aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander_Kabui2024-01-17 19:16:27 +0300
committerAlexander_Kabui2024-01-17 19:16:27 +0300
commit51c079116b2e81b49e1d1e8aa82f9aba74442ff5 (patch)
treefa21a7d1835cd0976b1c6cb3f35378a60db53736
parent6affb9eee7ec1611863da4c9126d9b25480d6d9d (diff)
downloadgenenetwork3-51c079116b2e81b49e1d1e8aa82f9aba74442ff5.tar.gz
Enhance error response message in API endpoint
-rw-r--r--gn3/api/llm.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/gn3/api/llm.py b/gn3/api/llm.py
index 9c277c1..3dd75fa 100644
--- a/gn3/api/llm.py
+++ b/gn3/api/llm.py
@@ -30,7 +30,7 @@ def gnqa():
})
except Exception as error:
- return jsonify({"query": query, "error": "Internal server error"}), 500
+ return jsonify({"query": query, "error": f"Request failed-{str(error)}"}), 500
@GnQNA.route("/rating/<task_id>/<doc_id>/<int:rating>", methods=["POST"])
@@ -39,7 +39,6 @@ def rating(task_id, doc_id, rating):
results = rate_document(task_id, doc_id, rating,
current_app.config.get("FAHAMU_AUTH_TOKEN"))
-
return jsonify({
**results,
"doc_id": doc_id,