Versions in this module Expand all Collapse all v0 v0.2.0 Apr 17, 2026 Changes in this version + type CustomProvider struct + func NewCustom(baseURL, apiKey, model string, dims int, headers map[string]string) *CustomProvider + func (p *CustomProvider) Dimensions() int + func (p *CustomProvider) Embed(ctx context.Context, text string) ([]float32, error) + func (p *CustomProvider) EmbedBatch(ctx context.Context, texts []string) ([][]float32, error) + type GeminiProvider struct + func NewGemini(ctx context.Context, apiKey, model string) (*GeminiProvider, error) + func (p *GeminiProvider) Close() error + func (p *GeminiProvider) Dimensions() int + func (p *GeminiProvider) Embed(ctx context.Context, text string) ([]float32, error) + func (p *GeminiProvider) EmbedBatch(ctx context.Context, texts []string) ([][]float32, error) + type OllamaProvider struct + func NewOllama(baseURL, model string, dims int) *OllamaProvider + func (p *OllamaProvider) Dimensions() int + func (p *OllamaProvider) Embed(ctx context.Context, text string) ([]float32, error) + func (p *OllamaProvider) EmbedBatch(ctx context.Context, texts []string) ([][]float32, error) + type OpenAIProvider struct + func NewOpenAI(apiKey, model, baseURL string) *OpenAIProvider + func (p *OpenAIProvider) Dimensions() int + func (p *OpenAIProvider) Embed(ctx context.Context, text string) ([]float32, error) + func (p *OpenAIProvider) EmbedBatch(ctx context.Context, texts []string) ([][]float32, error) + type Provider interface + Dimensions func() int + Embed func(ctx context.Context, text string) ([]float32, error) + EmbedBatch func(ctx context.Context, texts []string) ([][]float32, error)