diff options
author | Alexander_Kabui | 2024-09-06 11:59:20 +0300 |
---|---|---|
committer | Alexander_Kabui | 2024-09-06 11:59:20 +0300 |
commit | 9515dd6f835d2037fe86b1122aa1c79a108d8995 (patch) | |
tree | a5635cd99f75ae2503aa08006c2ae6fc20e146aa /gn2/wqflask | |
parent | bf038f640fa1bb9e06cbab1a47dcf3af945c0f47 (diff) | |
download | genenetwork2-9515dd6f835d2037fe86b1122aa1c79a108d8995.tar.gz |
Remove dead Api endpoints for gnqa.
Diffstat (limited to 'gn2/wqflask')
-rw-r--r-- | gn2/wqflask/views.py | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/gn2/wqflask/views.py b/gn2/wqflask/views.py index 336c1182..7ce0c96e 100644 --- a/gn2/wqflask/views.py +++ b/gn2/wqflask/views.py @@ -426,39 +426,6 @@ def gnqna_rating(task_id, weight): lambda x: (x.json(), x.status_code)) -@app.route("/gnqa/testing", methods=["GET", "POST"]) -@require_oauth2 -def qnqa_testing(): - def __error__(resp): - return render_template("gnqa_errors.html", - **{"status_code": resp.status_code, - **resp.json()}) - - def __success__(result): - return render_template("gnqa_chat_box.html", - **{"query": result["query"], - "answer": result["answer"], - "task_id": result["task_id"]["task_id"], - "references": result["references"]}) - if request.method == "POST" or request.args.get("query") is not None: - token = session_info()["user"]["token"].either( - lambda err: err, lambda tok: tok["access_token"]) - return (monad_requests.post( - urljoin(GN3_LOCAL_URL, - "/api/llm/gnqna"), - json={"querygnqa": request.form.get("query") or - request.args.get("query")}, - headers={ - "Authorization": f"Bearer {token}" - } - ).then( - lambda resp: resp.json() - ).either(__error__, __success__)) - return render_template("gnqa_test.html", history=["what is a gene", - "which genes are involved", - "what is a gene"]) - - @app.route("/gsearch_updating", methods=('POST',)) def gsearch_updating(): result = UpdateGSearch(request.args).__dict__ |