llms

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2024 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsCopilotInstalled

func IsCopilotInstalled() bool

Types

type Anthropic

type Anthropic struct {
	// contains filtered or unexported fields
}

func (*Anthropic) Call

func (o *Anthropic) Call(ctx context.Context, prompt string, options ...llms.CallOption) (string, error)

func (*Anthropic) Close

func (o *Anthropic) Close() error

func (*Anthropic) GenerateContent

func (o *Anthropic) GenerateContent(ctx context.Context, messages []llms.MessageContent, options ...llms.CallOption) (*llms.ContentResponse, error)

type AnythingLLM

type AnythingLLM struct {
	// contains filtered or unexported fields
}

func (*AnythingLLM) Call

func (a *AnythingLLM) Call(ctx context.Context, prompt string, options ...llms.CallOption) (string, error)

func (*AnythingLLM) Close

func (a *AnythingLLM) Close() error

func (*AnythingLLM) GenerateContent

func (a *AnythingLLM) GenerateContent(ctx context.Context, messages []llms.MessageContent, options ...llms.CallOption) (*llms.ContentResponse, error)

type Copilot

type Copilot struct{}

func (*Copilot) Call

func (c *Copilot) Call(ctx context.Context, prompt string, options ...llms.CallOption) (string, error)

func (*Copilot) Close

func (c *Copilot) Close() error

func (*Copilot) GenerateContent

func (c *Copilot) GenerateContent(ctx context.Context, messages []llms.MessageContent, options ...llms.CallOption) (*llms.ContentResponse, error)

type Mistral

type Mistral struct {
	// contains filtered or unexported fields
}

func (*Mistral) Call

func (o *Mistral) Call(ctx context.Context, prompt string, options ...llms.CallOption) (string, error)

func (*Mistral) Close

func (o *Mistral) Close() error

func (*Mistral) GenerateContent

func (o *Mistral) GenerateContent(ctx context.Context, messages []llms.MessageContent, options ...llms.CallOption) (*llms.ContentResponse, error)

type Model

type Model interface {
	llms.Model

	Close() error
}

func NewAnthropic

func NewAnthropic(opts []anthropic.Option) (Model, error)

func NewAnythingLLM

func NewAnythingLLM(baseURL, token, workspace string) (Model, error)

func NewCopilot

func NewCopilot() (Model, error)

func NewMistral

func NewMistral(opts []mistral.Option) (Model, error)

func NewOllama

func NewOllama(opts []ollama.Option) (Model, error)

func NewOpenAI

func NewOpenAI(opts []openai.Option) (Model, error)

type Ollama

type Ollama struct {
	// contains filtered or unexported fields
}

func (*Ollama) Call

func (o *Ollama) Call(ctx context.Context, prompt string, options ...llms.CallOption) (string, error)

func (*Ollama) Close

func (o *Ollama) Close() error

func (*Ollama) GenerateContent

func (o *Ollama) GenerateContent(ctx context.Context, messages []llms.MessageContent, options ...llms.CallOption) (*llms.ContentResponse, error)

type OpenAI

type OpenAI struct {
	// contains filtered or unexported fields
}

func (*OpenAI) Call

func (o *OpenAI) Call(ctx context.Context, prompt string, options ...llms.CallOption) (string, error)

func (*OpenAI) Close

func (o *OpenAI) Close() error

func (*OpenAI) GenerateContent

func (o *OpenAI) GenerateContent(ctx context.Context, messages []llms.MessageContent, options ...llms.CallOption) (*llms.ContentResponse, error)

Jump to

Keyboard shortcuts

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