embedding

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EmbeddingDimension = 256
)

Variables

This section is empty.

Functions

func Average

func Average(embeddings []firestore.Vector32) firestore.Vector32

func Generate

func Generate(ctx context.Context, client gollem.LLMClient, data any) (firestore.Vector32, error)

func WeightedAverage

func WeightedAverage(embeddings []firestore.Vector32, weights []float32) (firestore.Vector32, error)

WeightedAverage calculates the weighted average of embeddings. embeddings and weights must have the same length. weights should sum to 1.0 for proper normalization.

Types

This section is empty.

Jump to

Keyboard shortcuts

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