querymodifiers

package
v0.6.9 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const EnhanceQueryModifierName = "enhance"
View Source
const GenericQueryModifierName = "generic"
View Source
const SpellcheckQueryModifierName = "spellcheck"

Variables

View Source
var QueryModifiers = map[string]QueryModifier{
	SpellcheckQueryModifierName: SpellcheckQueryModifier{},
	EnhanceQueryModifierName:    EnhanceQueryModifier{},
	GenericQueryModifierName:    GenericQueryModifier{},
}

Functions

This section is empty.

Types

type EnhanceQueryModifier added in v0.1.7

type EnhanceQueryModifier struct {
	Model llm.LLMConfig
}

func (EnhanceQueryModifier) ModifyQueries added in v0.1.9

func (s EnhanceQueryModifier) ModifyQueries(queries []string) ([]string, error)

func (EnhanceQueryModifier) Name added in v0.1.9

func (s EnhanceQueryModifier) Name() string

type GenericQueryModifier added in v0.1.10

type GenericQueryModifier struct {
	Model  llm.LLMConfig
	Prompt string
}

func (GenericQueryModifier) ModifyQueries added in v0.1.10

func (s GenericQueryModifier) ModifyQueries(queries []string) ([]string, error)

func (GenericQueryModifier) Name added in v0.1.10

func (s GenericQueryModifier) Name() string

type QueryModifier

type QueryModifier interface {
	ModifyQueries(queries []string) ([]string, error)
	Name() string
}

func GetQueryModifier

func GetQueryModifier(name string) (QueryModifier, error)

type SpellcheckQueryModifier

type SpellcheckQueryModifier struct {
	Model llm.LLMConfig
}

func (SpellcheckQueryModifier) ModifyQueries added in v0.1.9

func (s SpellcheckQueryModifier) ModifyQueries(queries []string) ([]string, error)

func (SpellcheckQueryModifier) Name added in v0.1.9

Jump to

Keyboard shortcuts

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