aboutsummaryrefslogtreecommitdiff
path: root/gn3/api
diff options
context:
space:
mode:
authorAlexander_Kabui2024-03-25 15:56:02 +0300
committerAlexander_Kabui2024-03-25 15:56:02 +0300
commitec60064a8ba992bc2005d3d583dca1694f5a9fa6 (patch)
tree4d02ae48ff3219d9f6dcea3345bbde71bd126fb8 /gn3/api
parentdd56cc247a42ec27bdf198fcb4d6d819c5138918 (diff)
downloadgenenetwork3-ec60064a8ba992bc2005d3d583dca1694f5a9fa6.tar.gz
fix db path issue for lllm
Diffstat (limited to 'gn3/api')
-rw-r--r--gn3/api/llm.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/gn3/api/llm.py b/gn3/api/llm.py
index d22a42c..cb68526 100644
--- a/gn3/api/llm.py
+++ b/gn3/api/llm.py
@@ -16,6 +16,7 @@ from gn3.auth import db
from redis import Redis
+import os
import json
import sqlite3
from datetime import timedelta
@@ -23,6 +24,9 @@ from datetime import timedelta
GnQNA = Blueprint("GnQNA", __name__)
+
+
+
def handle_errors(func):
@wraps(func)
def decorated_function(*args, **kwargs):
@@ -73,7 +77,8 @@ def rating(task_id):
results.get("query"),
results.get("answer"),
results.get("weight", 0))
- with db.connection(current_app.config["DATA_DIR"]) as conn:
+
+ with db.connection(os.path.join(current_app.config["DATA_DIR"],"/llm.db")) as conn:
cursor = conn.cursor()
create_table = """CREATE TABLE IF NOT EXISTS Rating(
user_id INTEGER NOT NULL,