predict

package
v1.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 17, 2026 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EventPredictionProvider added in v1.2.0

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 added in v1.2.0

func NewEventPredictionProvider(
	interp *interpreter.Interpreter,
	logger *zap.Logger,
) *EventPredictionProvider

NewEventPredictionProvider creates a new EventPredictionProvider.

func (*EventPredictionProvider) Predict added in v1.2.0

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL