The feedback feature enables users to rate the quality of the bot's responses using a simple UI, which includes a thumbs up for positive feedback and a thumbs down for negative feedback. Users also have the option to provide written comments, offering more context or specific insights about their feedback. This feature is crucial in enhancing the bot's performance, as it relies on user input to refine and improve future interactions. It's important to note that only the user who provided feedback can see it. Additionally, feedback can be submitted for the bot's responses, but not for the welcome message.
Draw the feedback UI
You can draw and adjust the UI based on feedback status by following the code below.
Not applicable: This message is not eligible for feedback, possibly because it's not a bot response or it's the welcome message.
No feedback: The user has the option to provide feedback but hasn't done so yet.
Submitted: Feedback has already been submitted for this message.
Submit a feedback
You can submit a feedback by following the code below.
Update a feedback
You can update the feedback or comment by following the code below.
Delete a feedback
You can delete any feedback that has been submitted. However, if no feedback has been submitted, an error is returned.