embedder

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: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Embedder

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

Embedder batches text → []float32 vectors using an LLM provider.

func New

func New(provider llm.Provider, batchSize int) *Embedder

func (*Embedder) EmbedOne

func (e *Embedder) EmbedOne(ctx context.Context, text string) ([]float32, error)

EmbedOne embeds a single text.

func (*Embedder) EmbedTexts

func (e *Embedder) EmbedTexts(ctx context.Context, texts []string) ([][]float32, error)

EmbedTexts embeds a slice of texts using concurrent batches.

func (*Embedder) ModelID

func (e *Embedder) ModelID() string

ModelID returns the embedding model identifier.

Jump to

Keyboard shortcuts

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