aboutsummaryrefslogtreecommitdiff
path: root/gn3/api
diff options
context:
space:
mode:
authorAlexander_Kabui2024-01-03 19:29:04 +0300
committerAlexander_Kabui2024-01-03 19:29:04 +0300
commita227ee89544a4a12f63291a7ed6c203a715215ad (patch)
tree424262cca4f8b7c52974a3200a6a5c3a24e3ce65 /gn3/api
parentbc943ce0413e55d9a4903aea95baad86d808bf47 (diff)
downloadgenenetwork3-a227ee89544a4a12f63291a7ed6c203a715215ad.tar.gz
fix fetch token error from curent app
Diffstat (limited to 'gn3/api')
-rw-r--r--gn3/api/llm.py7
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,