vector

package
v1.3.8 Latest Latest
Warning

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

Go to latest
Published: May 19, 2026 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ProviderEmbedded = "embedded"
	ProviderOpenAI   = "openai"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type DoctorReport

type DoctorReport struct {
	Provider            string
	Description         string
	Model               string
	BaseURL             string
	ExecutionDevice     string
	RuntimeLibrary      string
	Reachable           bool
	EmbeddingWorks      bool
	EmbeddingDimensions int
	Diagnosis           string
	Hint                string
	Error               string
}

type Provider

type Provider struct {
	Name        string
	IndexKey    string
	Description string
	Model       string
	BaseURL     string
	APIKey      string
	Func        chromem.EmbeddingFunc
	Batch       func(context.Context, []string) ([][]float32, error)
	Details     func() map[string]string
}

func EmbeddedProvider

func EmbeddedProvider(paths xdg.Paths, modelName, accel string) (Provider, error)

func OpenAICompatibleProvider

func OpenAICompatibleProvider(model, baseURL, apiKey string) Provider

func ProviderFromEnv

func ProviderFromEnv(paths xdg.Paths) (Provider, error)

func (Provider) Doctor

func (p Provider) Doctor(ctx context.Context) DoctorReport

func (Provider) IndexPath

func (p Provider) IndexPath(root string) string

Jump to

Keyboard shortcuts

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