From c2a27c2676c4611b96d1ba758efb85b2839c42de Mon Sep 17 00:00:00 2001 From: ahmed531998 Date: Sat, 15 Apr 2023 11:23:07 +0200 Subject: [PATCH] new_feedback --- src/FeedbackForm.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/FeedbackForm.js b/src/FeedbackForm.js index 98fa372..e4bf18d 100644 --- a/src/FeedbackForm.js +++ b/src/FeedbackForm.js @@ -12,6 +12,7 @@ const FeedbackForm = (props) => { const [modQueryCorrectness, setModQueryCorrectness] = useState("no"); const [modQuery, setModQuery] = useState(""); const [response, setResponse] = useState(""); + const [evidence, setEvidence] = useState("NA"); const backendUrl = '/api';//process.env.REACT_APP_BACKEND_URL+'/api'; const mod = "Was this modification to the query correct? " + messages[0].modQuery function onSubmit(event) { @@ -35,6 +36,7 @@ const FeedbackForm = (props) => { ratings["usefulness"] = responseUsefulness; ratings["speed"] = responseTime; ratings["intent"] = intent; + ratings["evidence"] = evidence; fetch(backendUrl + '/feedback', { method: 'POST', @@ -121,6 +123,20 @@ const FeedbackForm = (props) => { +
+ + +