From 324f2ebf4106910386c2dceb8130ea32785068f0 Mon Sep 17 00:00:00 2001 From: Alexander_Kabui Date: Fri, 6 Sep 2024 14:00:49 +0300 Subject: Modify endpoint to use query string. --- gn3/api/llm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gn3/api/llm.py b/gn3/api/llm.py index 7e60271..90d5e1f 100644 --- a/gn3/api/llm.py +++ b/gn3/api/llm.py @@ -19,7 +19,7 @@ gnqa = Blueprint("gnqa", __name__) @gnqa.route("/search", methods=["PUT"]) def search(): """Api endpoint for searching queries in fahamu Api""" - query = request.json.get("querygnqa", "") + query = request.args.get("query", "") if not query: return jsonify({"error": "querygnqa is missing in the request"}), 400 fahamu_token = current_app.config.get("FAHAMU_AUTH_TOKEN") -- cgit v1.2.3