llm

package
v0.0.0-beta.30 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(*callOptions)

Option configures LLM completion.

func WithJSONMode

func WithJSONMode() Option

func WithMaxTokens

func WithMaxTokens(n int) Option

func WithTemperature

func WithTemperature(t float64) Option

type Provider

type Provider interface {
	Complete(ctx context.Context, prompt string, opts ...Option) (string, error)
	Embed(ctx context.Context, text string) ([]float32, error)
	EmbedBatch(ctx context.Context, texts []string) ([][]float32, error)
	Name() string
	ModelID() string
}

Provider is the unified LLM interface.

func NewProvider

func NewProvider(cfg *config.LLMConfig) (Provider, error)

NewProvider constructs the configured provider.

Jump to

Keyboard shortcuts

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