embedding

package
v0.1.0-round1 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2026 License: Apache-2.0 Imports: 5 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package embedding adapts the standalone vector engine to WAS domain contracts.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config = vector.Config

Config identifies the pinned vector model, tokenizer, and runtime artifacts.

type E5

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

E5 translates WAS processing profiles and errors at the embedding seam.

func New

func New(config Config) (*E5, error)

New opens the standalone vector engine behind the WAS embedding seam.

func (*E5) Close

func (e *E5) Close() error

Close releases the local inference runtime.

func (*E5) CountTokens

func (e *E5) CountTokens(text string) (int, error)

CountTokens returns the encoded passage length used by the vector engine.

func (*E5) EmbedPassages

func (e *E5) EmbedPassages(
	ctx context.Context,
	passages []string,
	profile knowledge.Profile,
) ([][]float32, error)

EmbedPassages creates one normalized vector per passage for profile.

func (*E5) EmbedQuery

func (e *E5) EmbedQuery(ctx context.Context, query string, profile knowledge.Profile) ([]float32, error)

EmbedQuery creates one normalized query vector for profile.

func (*E5) Ready

func (e *E5) Ready(ctx context.Context) error

Ready reports whether the vector engine can accept work.

Jump to

Keyboard shortcuts

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