about summary refs log tree commit diff
path: root/gn3/api/llm.py
diff options
context:
space:
mode:
authorAlexander_Kabui2025-06-05 15:27:14 +0300
committerBonfaceKilz2025-07-07 07:56:57 +0300
commit448825dcfc2dec150ce25d4ccf6a8cb4490d3b64 (patch)
tree90453b932154df6fca2be509082feeb90f018261 /gn3/api/llm.py
parent5312a03e3de5c62291c3cc19eae144de7c833eff (diff)
downloadgenenetwork3-448825dcfc2dec150ce25d4ccf6a8cb4490d3b64.tar.gz
refactor: Replace cache query with user query if results in db.
Diffstat (limited to 'gn3/api/llm.py')
-rw-r--r--gn3/api/llm.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/gn3/api/llm.py b/gn3/api/llm.py
index 834cd54..fc54a41 100644
--- a/gn3/api/llm.py
+++ b/gn3/api/llm.py
@@ -83,6 +83,8 @@ def search(auth_token=None):
         previous_result = res.fetchone()
         if previous_result:
             _, _, _, response = previous_result
+            response = json.loads(response)
+            response["query"] = query
             return response
 
         task_id, answer, refs = get_gnqa(