The React feedback component adds thumbs up/thumbs down buttons and a feedback popover to collect user feedback about your AI-generated responses. View feedback in your Melodi dashboard.
For optimal analytics, we recommend first creating threads using the SDKs, then referencing them
in the feedback widget. This ensures all conversations are tracked, even those without feedback.
<MelodiFeedbackWidget thread={{ messages: [ { role: 'user', content: 'Hello!', }, { role: 'assistant', content: 'Hi! How can I help you today?', } ], projectName: 'My Project', metadata: { environment: 'production', feature: 'chat' } }} userInfo={{ id: 'user-123', email: 'user@example.com' }} companyName="My Company" // Optional: Set the feedback widget variant // variant="flag"/>
Only threads that contain feedback will be displayed in the Melodi dashboard. To unlock analytics for all sessions, we recommend creating threads via the SDK then referencing them in the widget.