Documentation ¶
Index ¶
- Variables
- type LLM
- func (o *LLM) Call(ctx context.Context, prompt string, options ...llms.CallOption) (string, error)
- func (o *LLM) CreateEmbedding(ctx context.Context, texts []string) ([][]float32, error)
- func (o *LLM) GenerateContent(ctx context.Context, messages []llms.MessageContent, ...) (*llms.ContentResponse, error)
- type Option
- func WithEmbeddingSize(val int) Option
- func WithFrequencyPenalty(val float64) Option
- func WithGrammar(val string) Option
- func WithIgnoreEOS(val bool) Option
- func WithLogitBias(val []interface{}) Option
- func WithMinP(val float64) Option
- func WithMirostat(val int) Option
- func WithMirostatEta(val float64) Option
- func WithMirostatTau(val float64) Option
- func WithModel(val string) Option
- func WithNCtx(val int) Option
- func WithNKeep(val int) Option
- func WithNPredict(val int) Option
- func WithNProbs(val int) Option
- func WithPenalizeNL(val bool) Option
- func WithPenaltyPromptTokens(val []interface{}) Option
- func WithPresencePenalty(val float64) Option
- func WithRepeatLastN(val int) Option
- func WithRepeatPenalty(val float64) Option
- func WithSeed(val uint32) Option
- func WithStop(val []string) Option
- func WithStream(val bool) Option
- func WithTemperature(val float64) Option
- func WithTfsZ(val float64) Option
- func WithTopK(val int) Option
- func WithTopP(val float64) Option
- func WithTypicalP(val float64) Option
- func WithUsePenaltyPromptTokens(val bool) Option
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrEmptyResponse = errors.New("no response") ErrIncompleteEmbedding = errors.New("no all input got emmbedded") )
Functions ¶
This section is empty.
Types ¶
type LLM ¶
LLM is a llamafile LLM implementation.
func (*LLM) CreateEmbedding ¶
func (*LLM) GenerateContent ¶
func (o *LLM) GenerateContent(ctx context.Context, messages []llms.MessageContent, options ...llms.CallOption) (*llms.ContentResponse, error)
GenerateContent implements the Model interface. nolint: goerr113
type Option ¶
type Option func(*llamafileclient.GenerationSettings)
func WithFrequencyPenalty ¶
/ WithFrequencyPenalty sets the frequency penalty.
func WithLogitBias ¶
func WithLogitBias(val []interface{}) Option
WithLogitBias sets the logit bias.
func WithMirostatEta ¶
WithMirostatEta sets the mirostat eta.
func WithMirostatTau ¶
WithMirostatTau sets the mirostat tau.
func WithPenalizeNL ¶
WithPenalizeNL sets the penalize newline option.
func WithPenaltyPromptTokens ¶
func WithPenaltyPromptTokens(val []interface{}) Option
WithPenaltyPromptTokens sets the penalty prompt tokens.
func WithPresencePenalty ¶
WithPresencePenalty sets the presence penalty.
func WithRepeatPenalty ¶
WithRepeatPenalty sets the repeat penalty.
func WithTemperature ¶
WithTemperature sets the temperature.
func WithUsePenaltyPromptTokens ¶
WithUsePenaltyPromptTokens sets the use penalty prompt tokens flag.
Click to show internal directories.
Click to hide internal directories.