predict

package
v0.31.0 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2025 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BEST_PRACTICES = `* Git commit messages should follow conventional commit message format`
)

Variables

View Source
var COMPLETION_CANDIDATES_SCHEMA = utils.GenerateJsonSchema(CompletionCandidates{})
View Source
var EXPLAINED_COMMAND_SCHEMA = utils.GenerateJsonSchema(explainedCommand{})
View Source
var PREDICTED_COMMAND_SCHEMA = utils.GenerateJsonSchema(PredictedCommand{})

Functions

This section is empty.

Types

type CompletionCandidates

type CompletionCandidates struct {
	Candidates []string `` /* 221-byte string literal not displayed */
}

type LLMExplainer

type LLMExplainer struct {
	// contains filtered or unexported fields
}

func NewLLMExplainer

func NewLLMExplainer(
	runner *interp.Runner,
	logger *zap.Logger,
) *LLMExplainer

func (*LLMExplainer) Explain

func (e *LLMExplainer) Explain(input string) (string, error)

func (*LLMExplainer) UpdateContext

func (p *LLMExplainer) UpdateContext(context *map[string]string)

type LLMNullStatePredictor

type LLMNullStatePredictor struct {
	// contains filtered or unexported fields
}

func NewLLMNullStatePredictor

func NewLLMNullStatePredictor(
	runner *interp.Runner,
	logger *zap.Logger,
) *LLMNullStatePredictor

func (*LLMNullStatePredictor) Predict

func (p *LLMNullStatePredictor) Predict(input string) (string, string, error)

func (*LLMNullStatePredictor) UpdateContext

func (p *LLMNullStatePredictor) UpdateContext(context *map[string]string)

type LLMPrefixPredictor

type LLMPrefixPredictor struct {
	// contains filtered or unexported fields
}

func NewLLMPrefixPredictor

func NewLLMPrefixPredictor(
	runner *interp.Runner,
	historyManager *history.HistoryManager,
	logger *zap.Logger,
) *LLMPrefixPredictor

func (*LLMPrefixPredictor) Predict

func (p *LLMPrefixPredictor) Predict(input string) (string, string, error)

func (*LLMPrefixPredictor) UpdateContext

func (p *LLMPrefixPredictor) UpdateContext(context *map[string]string)

type PredictRouter

type PredictRouter struct {
	PrefixPredictor    *LLMPrefixPredictor
	NullStatePredictor *LLMNullStatePredictor
}

func (*PredictRouter) Predict

func (p *PredictRouter) Predict(input string) (string, string, error)

func (*PredictRouter) UpdateContext

func (p *PredictRouter) UpdateContext(context *map[string]string)

type PredictedCommand

type PredictedCommand struct {
	PredictedCommand string `json:"predicted_command" description:"The full bash command predicted by the model" required:"true"`
}

Jump to

Keyboard shortcuts

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