Versions in this module Expand all Collapse all v0 v0.0.1 Aug 9, 2024 Changes in this version + var ErrEmptyResponse = errors.New("empty response") + var ErrMissingToken = errors.New(...) + var ErrUnexpectedResponseLength = errors.New("unexpected length of response") + 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) CreateEmbedding(ctx context.Context, inputTexts []string, model string, task string) ([][]float32, error) + func (o *LLM) GenerateContent(ctx context.Context, messages []llms.MessageContent, ...) (*llms.ContentResponse, error) + type Option func(*options) + func WithModel(model string) Option + func WithToken(token string) Option + func WithURL(url string) Option