@bryel/feedback
v0.1.0
Published
Server-side SDK for recording user feedback (π/π, scores, comments, corrections, labels) against a bryel generation or session. Zero deps; POSTs to /v1/feedback.
Maintainers
Readme
@bryel/feedback
Record user feedback β π/π, scores, comments, corrections, labels β against a bryel generation or session. Server-side, zero dependencies.
npm i @bryel/feedbackimport { recordFeedback, thumbsUp, thumbsDown } from "@bryel/feedback";
await recordFeedback({
apiKey: process.env.BRYEL_KEY!,
target: { type: "message", id: messageId }, // or { type: "session", id: sessionId }
kind: "thumb", // thumb | score | comment | correction | label
score: 1, // π=1 / π=0, or a scalar
userId, // β annotator
source: "end_user", // end_user | labeler | model_judge | code
});
// shorthands
await thumbsUp({ apiKey, target: { type: "message", id: messageId } });Keep the key server-side β proxy browser clicks through your backend. The messageId is a
per-turn handle you mint and pass into your AI SDK call's telemetry metadata; bryel stamps it
onto the spans as bryel.interaction.id so the score joins back to the right turn.
MIT Β© bryel
