embedder

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EmbeddingDim = 384 // all-MiniLM-L6-v2 output dimension
	MaxSeqLen    = 256 // Maximum sequence length
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Embedder

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

Embedder generates embeddings using ONNX runtime.

func New

func New(modelPath, onnxLibPath string) (*Embedder, error)

New creates a new Embedder.

func (*Embedder) Close

func (e *Embedder) Close() error

Close destroys the ONNX session.

func (*Embedder) Embed

func (e *Embedder) Embed(texts []string) ([][]float32, error)

Embed generates embeddings for a batch of texts.

Jump to

Keyboard shortcuts

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