DOCS
v0.4

AI Components / Feedback

Feedback

User feedback widget for RLHF. Thumbs, stars, or emoji mode. Optional comment and issue tags.

ai-workflowv0.3.0

Playground

Examples

Thumbs
<ai-feedback mode="thumbs"></ai-feedback>
Stars
<ai-feedback mode="stars"></ai-feedback>
Emoji
<ai-feedback mode="emoji"></ai-feedback>

Import

import { AiFeedback } from '@cognivo/components';
// Or tree-shake: import '@cognivo/components/ai-feedback';

Per-component imports ship only that component (~8 kB gzip).

API Reference

PropTypeDefaultDescription
mode"thumbs" | "stars" | "emoji""thumbs"Rating mode
tagsstring[]["Inaccurate", ...]Issue tags
messageIdstringAssociated message
showCommentbooleanfalseShow comment field

Events

EventDetailDescription
ai-feedback-submit{rating, mode, tags?, comment?, messageId?}Feedback submitted