UNPKG

axiom

Version:

Axiom AI SDK provides - an API to wrap your AI calls with observability instrumentation. - offline evals - online evals

156 lines (80 loc) 2.27 kB
[**axiom v0.51.1**](../../README.md) *** [axiom](../../README.md) / [feedback](../README.md) / Feedback # Variable: Feedback > `const` **Feedback**: `object` Helper functions for creating feedback input objects. ## Type Declaration ### bool() > **bool**: (`input`) => `FeedbackInputBoolean` = `boolFeedback` Creates a boolean feedback with a true/false value. #### Parameters ##### input `FeedbackParamsBoolean` #### Returns `FeedbackInputBoolean` ### enum() > **enum**: \<`T`\>(`input`) => `FeedbackInputText` = `enumFeedback` Creates a text feedback from a string enum value. #### Type Parameters ##### T `T` *extends* `string` #### Parameters ##### input `FeedbackInputBase` & `object` #### Returns `FeedbackInputText` ### number() > **number**: (`input`) => `FeedbackInputNumber` = `numberFeedback` Creates a number feedback with a number value. #### Parameters ##### input `FeedbackParamsNumber` #### Returns `FeedbackInputNumber` ### signal() > **signal**: (`input`) => `FeedbackInputSignal` = `signalFeedback` Creates a signal feedback (no value, just indicates an event occurred). #### Parameters ##### input `FeedbackParamsSignal` #### Returns `FeedbackInputSignal` ### text() > **text**: (`input`) => `FeedbackInputText` = `textFeedback` Creates a text feedback with a free-form string value. #### Parameters ##### input `FeedbackParamsText` #### Returns `FeedbackInputText` ### thumb() > **thumb**: (`__namedParameters`) => `FeedbackInputThumb` = `thumbFeedback` Creates a thumb feedback with 'up' or 'down' value. #### Parameters ##### \_\_namedParameters `FeedbackInputBase` & `object` #### Returns `FeedbackInputThumb` ### thumbDown() > **thumbDown**: (`input`) => `FeedbackInputThumb` = `thumbDownFeedback` Creates a thumbs down (-1) feedback. #### Parameters ##### input `FeedbackInputBase` #### Returns `FeedbackInputThumb` ### thumbUp() > **thumbUp**: (`input`) => `FeedbackInputThumb` = `thumbUpFeedback` Creates a thumbs up (+1) feedback. #### Parameters ##### input `FeedbackInputBase` #### Returns `FeedbackInputThumb` ## Example ```ts Feedback.thumbUp({ name: 'response-quality' }) Feedback.number({ name: 'rating', value: 4 }) Feedback.signal({ name: 'completed' }) ```