DOCS
v0.4

AI Components / Feedback

Feedback

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

ai-workflow v0.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
tags string[] ["Inaccurate", ...] Issue tags
messageId string Associated message
showComment boolean false Show comment field

Events

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