Closed sylvanie85 closed 3 months ago
Hi, @Francois-Werbrouck @ChromaticPanic is that ok ?
Hi, @Francois-Werbrouck @ChromaticPanic is that ok ?
Looks good to me! (From the front end)
I'll send this in post data for positive feedback
export interface FeedbackDataPositive {
userId: string;
inferenceId: string;
boxes: Array<{
boxId: string;
}>;
}
const request = {
method: "post",
url: `${backendUrl}/feedback-positive`,
headers: {
"Content-Type": "application/json",
"Access-Control-Allow-Origin": "*",
},
data: {
userId: uuid,
inferenceId: inferenceId,
boxes: [{
boxId,
}]
},
};
To let the users save their inference feedback, the backend needs to have an endpoint where it'll retrieve the feedback and send them to the datastore depends on if the inference is perfect or if the user has made some corrections.
The endpoint need to retrieve the user_id of the user who sends the feedback, the inference_id of the inference in question and, if the inference is not perfect, the inference_feedback as a json, contains the user corrections.
If the inference is perfect :
If there is a correction :