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

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