+
+
+
+
+
+
Search History
+
+
+ {% for record in history %}
+
+
+
+
+
+
+
+
+
+
+ Welcome to the GeneNetwork Question and Answer (GNQA)system. We utilize a large language model and 3000 scientific publications to make GNQA a subject matter expert in three areas: GeneNetwork.org , genomics/genetics with regards to diabetes and genomics/genetics with regards to agin. .
+
+
At the moment when you ask GNQA something it will attempt to return a sensible answer with real references. To this end we aim to reduce hallucinations and provide a knowledge launchpad for a researcher to enhance their knowledge on the relevant subject matter.
+
+ GNQA is not a finished product as we are working diligently to improve it daily.
+
+
Thanks for using GNQA!
+
+
+
+
+
+
+ Examples of Questions
+
+
+ What is a gene?
+
+ What is genetic study?
+ Which genes are involved in the aging process?
+
+
+
+
+
+
+
+
+
+
+
+
+{% endblock %}
+{% block js %}
+
+
+
+
+{% endblock %}
+
--
cgit v1.2.3
From a514d910fe16c5e693dd03d8a78885aedfb97ad4 Mon Sep 17 00:00:00 2001
From: Alexander_Kabui
Date: Tue, 23 Apr 2024 18:28:13 +0300
Subject: Create an endpoint for gnqa test template
---
gn2/wqflask/views.py | 33 +++++++++++++++++++++++++++++++++
1 file changed, 33 insertions(+)
(limited to 'gn2/wqflask')
diff --git a/gn2/wqflask/views.py b/gn2/wqflask/views.py
index 074ccae2..c126524b 100644
--- a/gn2/wqflask/views.py
+++ b/gn2/wqflask/views.py
@@ -347,6 +347,39 @@ 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__
--
cgit v1.2.3