Versions in this module Expand all Collapse all v0 v0.1.15 Oct 30, 2024 v0.1.14 Oct 30, 2024 Changes in this version + var ErrEmptyResponse = errors.New("no response") + var ErrIncompleteEmbedding = errors.New("not all input got embedded") + type LLM struct + CallbacksHandler callbacks.Handler + func New(opts ...Option) (*LLM, error) + func (o *LLM) Call(ctx context.Context, prompt string, options ...llms.CallOption) (string, error) + func (o *LLM) GenerateContent(ctx context.Context, messages []llms.MessageContent, ...) (*llms.ContentResponse, error) + type Option func(*options) + func WithChatMode(chatMode bool) Option + func WithCustomTemplate(template string) Option + func WithDoSample(doSample bool) Option + func WithFormat(format string) Option + func WithHTTPClient(client *http.Client) Option + func WithMaxTokens(maxTokens int) Option + func WithModel(model string) Option + func WithRepetitionPenalty(repetitionPenalty float64) Option + func WithServerURL(rawURL string) Option + func WithStoppingTokens(tokens []string) Option + func WithStream(stream bool) Option + func WithSystemPrompt(p string) Option + func WithTemperature(temperature float64) Option + func WithToken(token string) Option + func WithTokensPerMessage(tokensPerMessage int) Option + func WithTopP(topP float64) Option