diff options
author | Alexander_Kabui | 2024-01-03 19:29:04 +0300 |
---|---|---|
committer | Alexander_Kabui | 2024-01-03 19:29:04 +0300 |
commit | a227ee89544a4a12f63291a7ed6c203a715215ad (patch) | |
tree | 424262cca4f8b7c52974a3200a6a5c3a24e3ce65 /gn3/api | |
parent | bc943ce0413e55d9a4903aea95baad86d808bf47 (diff) | |
download | genenetwork3-a227ee89544a4a12f63291a7ed6c203a715215ad.tar.gz |
fix fetch token error from curent app
Diffstat (limited to 'gn3/api')
-rw-r--r-- | gn3/api/llm.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/gn3/api/llm.py b/gn3/api/llm.py index 83b5e85..68e6acc 100644 --- a/gn3/api/llm.py +++ b/gn3/api/llm.py @@ -2,7 +2,7 @@ # pylint: skip-file -from flask import jsonify, request, Blueprint +from flask import jsonify, request, Blueprint, current_app from gn3.llms.process import getGNQA @@ -16,7 +16,10 @@ def gnqa(): return jsonify({"error": "querygnqa is missing in the request"}), 400 try: - answer, refs = getGNQA(query) + auth_token = current_app.config.get("FAHAMU_AUTH_TOKEN") + answer, refs = getGNQA( + query, auth_token) + return jsonify({ "query": query, "answer": answer, |