diff options
author | Alexander_Kabui | 2024-05-01 02:59:43 +0300 |
---|---|---|
committer | Alexander_Kabui | 2024-05-01 02:59:43 +0300 |
commit | 24771494483a6d616c7f244512dc6810d872a30e (patch) | |
tree | f05e9e1543447d559050a002aa8a27fcb9f36a51 /gn3/api | |
parent | c6a4689b1453978b163058e48c68d28b3e9d87ed (diff) | |
download | genenetwork3-24771494483a6d616c7f244512dc6810d872a30e.tar.gz |
Fix: fix string formatting error and remove unused imports.
Diffstat (limited to 'gn3/api')
-rw-r--r-- | gn3/api/llm.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/gn3/api/llm.py b/gn3/api/llm.py index 1f96b79..e19077c 100644 --- a/gn3/api/llm.py +++ b/gn3/api/llm.py @@ -10,7 +10,6 @@ from gn3.llms.process import get_user_queries from gn3.llms.process import fetch_query_results from gn3.auth.authorisation.oauth2.resource_server import require_oauth from gn3.auth import db -from gn3.settings import LLM_DB_PATH from redis import Redis import json import sqlite3 @@ -63,7 +62,7 @@ def gnqa(): def rating(task_id): try: with (require_oauth.acquire("profile") as token, - db.connection(current_app.config.get(LLM_DB_PATH)) as conn): + db.connection(current_app.config.get("LLM_DB_PATH")) as conn): results = request.json user_id, query, answer, weight = (token.user.user_id, @@ -89,8 +88,7 @@ def rating(task_id): "status": 0 }, 200 except sqlite3.Error as error: - return jsonify({"error": str(error), - "llm_db_path": LLM_DB_PATH}), 500 + return jsonify({"error": str(error)}), 500 except Exception as error: raise error |