llm

package
v0.18.0 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrAPIKeyRequired = errors.New("API key is required")
View Source
var ErrModelIsNil = errors.New("model is nil")
View Source
var ErrModelRequired = errors.New("model is required")
View Source
var ErrServerURLRequired = errors.New("server URL is required")
View Source
var ErrUnsupportedProvider = errors.New("unsupported llm provider")

Functions

func New

func New(ctx context.Context, config Config) (llms.Model, error)

func Query

func Query(ctx context.Context, model llms.Model, query string, extraContext string) (string, error)

func QueryForReference

func QueryForReference(ctx context.Context, model llms.Model, linterOutput string, codeLanguage string) (string, error)

Types

type Config

type Config struct {
	Provider  string
	APIKey    string
	Model     string
	ServerURL string
}

Jump to

Keyboard shortcuts

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