Documentation
¶
Index ¶
- type Collector
- func (c *Collector) CaptureInteraction(prompt, response, modelID string) string
- func (c *Collector) GetInteractionCount() int
- func (c *Collector) GetQueueSize() int
- func (c *Collector) RecordExplicitFeedback(interactionID string, score float64, feedback string)
- func (c *Collector) RecordImplicitFeedback(interactionID string, action FeedbackAction)
- func (c *Collector) ShouldPromptForFeedback() bool
- func (c *Collector) Start() error
- func (c *Collector) Stop() error
- type FeedbackAction
- type FeedbackPromptModel
- func (m FeedbackPromptModel) GetResult() *FeedbackResult
- func (m FeedbackPromptModel) Init() tea.Cmd
- func (m FeedbackPromptModel) IsDismissed() bool
- func (m FeedbackPromptModel) IsSubmitted() bool
- func (m FeedbackPromptModel) Update(msg tea.Msg) (FeedbackPromptModel, tea.Cmd)
- func (m FeedbackPromptModel) View() string
- type FeedbackResult
- type ImplicitSignal
- type InteractionData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Collector ¶
type Collector struct {
// contains filtered or unexported fields
}
Collector manages automatic collection and submission of RLHF data
func NewCollector ¶
func NewCollector(cfg *config.RLHFConfig, client *rlhf.Client) *Collector
NewCollector creates a new RLHF collector instance
func (*Collector) CaptureInteraction ¶
CaptureInteraction captures a new interaction for potential submission
func (*Collector) GetInteractionCount ¶
GetInteractionCount returns the total interaction count
func (*Collector) GetQueueSize ¶
GetQueueSize returns the current queue size
func (*Collector) RecordExplicitFeedback ¶
RecordExplicitFeedback records explicit user feedback
func (*Collector) RecordImplicitFeedback ¶
func (c *Collector) RecordImplicitFeedback(interactionID string, action FeedbackAction)
RecordImplicitFeedback records an implicit feedback signal
func (*Collector) ShouldPromptForFeedback ¶
ShouldPromptForFeedback determines if user should be prompted for feedback
type FeedbackAction ¶
type FeedbackAction string
FeedbackAction represents user actions that indicate quality
const ( ActionRegenerate FeedbackAction = "regenerate" ActionEdit FeedbackAction = "edit" ActionCopy FeedbackAction = "copy" ActionContinue FeedbackAction = "continue" )
type FeedbackPromptModel ¶
type FeedbackPromptModel struct {
// contains filtered or unexported fields
}
FeedbackPromptModel represents the feedback prompt UI component
func NewFeedbackPromptModel ¶
func NewFeedbackPromptModel(interactionID string) FeedbackPromptModel
NewFeedbackPromptModel creates a new feedback prompt model
func (FeedbackPromptModel) GetResult ¶
func (m FeedbackPromptModel) GetResult() *FeedbackResult
GetResult returns the feedback result
func (FeedbackPromptModel) Init ¶
func (m FeedbackPromptModel) Init() tea.Cmd
Init initializes the model
func (FeedbackPromptModel) IsDismissed ¶
func (m FeedbackPromptModel) IsDismissed() bool
IsDismissed returns whether the prompt was dismissed
func (FeedbackPromptModel) IsSubmitted ¶
func (m FeedbackPromptModel) IsSubmitted() bool
IsSubmitted returns whether the feedback was submitted
func (FeedbackPromptModel) Update ¶
func (m FeedbackPromptModel) Update(msg tea.Msg) (FeedbackPromptModel, tea.Cmd)
Update handles messages
func (FeedbackPromptModel) View ¶
func (m FeedbackPromptModel) View() string
View renders the feedback prompt
type FeedbackResult ¶
FeedbackResult represents the result of a feedback prompt
type ImplicitSignal ¶
type ImplicitSignal struct {
Action string // "regenerate", "edit", "copy", "continue"
Timestamp time.Time
Score float64
}
ImplicitSignal represents an implicit feedback action
type InteractionData ¶
type InteractionData struct {
ID string
Prompt string
Response string
Timestamp time.Time
ModelID string
SessionID string
ImplicitScore float64
ExplicitScore float64
UserFeedback string
Metadata map[string]interface{}
ImplicitSignals []ImplicitSignal
HasExplicitScore bool
}
InteractionData represents a captured interaction with metadata