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) CreateEmbedding(ctx context.Context, inputTexts []string) ([][]float32, error) + func (o *LLM) GenerateContent(ctx context.Context, messages []llms.MessageContent, ...) (*llms.ContentResponse, error) + type Option func(*options) + func WithAccountID(accountID string) Option + func WithEmbeddingModel(model string) Option + func WithHTTPClient(client *http.Client) Option + func WithModel(model string) Option + func WithServerURL(rawURL string) Option + func WithSystemPrompt(p string) Option + func WithToken(token string) Option