Documentation ¶
Index ¶
- Constants
- func New(ctx context.Context, c Config, bot *internal.Bot) (river.Worker[background.ClassifierArgs], error)
- func NewDev(ctx context.Context, bot *internal.Bot) river.Worker[background.ClassifierArgs]
- type Action
- type ClassifierWorker
- type Config
- type DevClassifierWorker
- type IncidentAction
- type Priority
Constants ¶
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New(ctx context.Context, c Config, bot *internal.Bot) (river.Worker[background.ClassifierArgs], error)
func NewDev ¶
func NewDev(ctx context.Context, bot *internal.Bot) river.Worker[background.ClassifierArgs]
Types ¶
type ClassifierWorker ¶
type ClassifierWorker struct { river.WorkerDefaults[background.ClassifierArgs] // contains filtered or unexported fields }
func (*ClassifierWorker) Work ¶
func (w *ClassifierWorker) Work(ctx context.Context, job *river.Job[background.ClassifierArgs]) error
type Config ¶
type Config struct { OpenAIAPIKey string `envconfig:"OPENAI_API_KEY" default:"fake-classifier-key"` OpenAIURL string `envconfig:"OPENAI_URL" default:"http://localhost:11434/v1/"` OpenAIModel string `envconfig:"OPENAI_MODEL"` // In case it is possible to deterministically classify an incident (the alert bot always uses // the same message format), we can use this to classify the incident without using the OpenAI API. IncidentClassificationBinary string `split_words:"true"` }
type DevClassifierWorker ¶
type DevClassifierWorker struct { river.WorkerDefaults[background.ClassifierArgs] // contains filtered or unexported fields }
func (*DevClassifierWorker) Work ¶
func (w *DevClassifierWorker) Work(ctx context.Context, job *river.Job[background.ClassifierArgs]) error
type IncidentAction ¶
Click to show internal directories.
Click to hide internal directories.