From 2b7c65d83d386a2c5776f43f652a9fcff3dd4825 Mon Sep 17 00:00:00 2001 From: ahmed531998 Date: Sat, 15 Apr 2023 11:21:45 +0200 Subject: [PATCH] new_feedback_field --- main.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/main.py b/main.py index 604b9d9..6faf789 100644 --- a/main.py +++ b/main.py @@ -112,9 +112,9 @@ def feedback(): data = request.get_json().get("feedback") print(data) - cur.execute('INSERT INTO feedback_trial (query, history, janet_modified_query, is_modified_query_correct, user_modified_query, response, preferred_response, response_length_feedback, response_fluency_feedback, response_truth_feedback, response_useful_feedback, response_time_feedback, response_intent) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)', + cur.execute('INSERT INTO feedback_experimental (query, history, janet_modified_query, is_modified_query_correct, user_modified_query, evidence_useful, response, preferred_response, response_length_feedback, response_fluency_feedback, response_truth_feedback, response_useful_feedback, response_time_feedback, response_intent) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)', (data['query'], data['history'], data['modQuery'], - data['queryModCorrect'], data['correctQuery'], + data['queryModCorrect'], data['correctQuery'], data['evidence'], data['janetResponse'], data['preferredResponse'], data['length'], data['fluency'], data['truthfulness'], data['usefulness'], data['speed'], data['intent']) @@ -167,14 +167,15 @@ if __name__ == "__main__": rg = ResponseGenerator(index,db, rec, generators, retriever) - - cur.execute('CREATE TABLE IF NOT EXISTS feedback_trial (id serial PRIMARY KEY,' + + cur.execute('CREATE TABLE IF NOT EXISTS feedback_experimental (id serial PRIMARY KEY,' 'query text NOT NULL,' 'history text NOT NULL,' 'janet_modified_query text NOT NULL,' 'is_modified_query_correct text NOT NULL,' 'user_modified_query text NOT NULL,' - 'response text NOT NULL,' + 'evidence_useful text NOT NULL,' + 'response text NOT NULL,' 'preferred_response text,' 'response_length_feedback text NOT NULL,' 'response_fluency_feedback text NOT NULL,'