Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EventPredictionProvider ¶
type EventPredictionProvider struct {
// contains filtered or unexported fields
}
EventPredictionProvider calls the repl.predict middleware chain to obtain predictions. If no middleware is registered or middleware returns null, no prediction is returned.
func NewEventPredictionProvider ¶
func NewEventPredictionProvider( interp *interpreter.Interpreter, logger *zap.Logger, ) *EventPredictionProvider
NewEventPredictionProvider creates a new EventPredictionProvider.
func (*EventPredictionProvider) Predict ¶
func (p *EventPredictionProvider) Predict(ctx context.Context, input string, trigger interpreter.PredictTrigger, existingPrediction string) (string, error)
Predict emits the repl.predict event with the specified trigger and parses the middleware response. If middleware returns no prediction or an error, an empty string is returned. Implements PredictionProvider interface.
Click to show internal directories.
Click to hide internal directories.