diff options
-rw-r--r-- | gn3/api/llm.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/gn3/api/llm.py b/gn3/api/llm.py index 442252f..41cc376 100644 --- a/gn3/api/llm.py +++ b/gn3/api/llm.py @@ -90,6 +90,18 @@ def rating(task_id): return jsonify({"error": str(error)}), 500 + +@gnqa.route("/searches/", methods=["GET"]) +@require_oauth("profile user") +def fetch_prev_searches(): + with (require_oauth.acquire("profile user") as __the_token, + Redis.from_url(current_app.config["REDIS_URI"], + decode_responses=True) as redis_conn): + return jsonify({ + "prev_queries": get_user_queries("random_user", redis_conn) + }) + + @gnqa.route("/history/<query>", methods=["GET"]) @require_oauth("profile user") def fetch_user_hist(query): @@ -103,6 +115,7 @@ def fetch_user_hist(query): }) + @gnqa.route("/historys/<query>", methods=["GET"]) def fetch_users_hist_records(query): """method to fetch all users hist:note this is a test functionality |