new_feedback_field

This commit is contained in:
ahmed531998 2023-04-15 11:21:45 +02:00
parent b006bc01ce
commit 2b7c65d83d
1 changed files with 6 additions and 5 deletions

11
main.py
View File

@ -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,'