embeddingutil

package
v1.2.3 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyManagedEmbedding

func ApplyManagedEmbedding(node *storage.Node, embeddings [][]float32, model string, dimensions int, embeddedAt time.Time)

ApplyManagedEmbedding writes worker-compatible embedding payload to node fields.

func BuildText

func BuildText(properties map[string]interface{}, labels []string, opts *EmbedTextOptions) string

BuildText creates canonical embedding text from node properties and labels.

func InvalidateManagedEmbeddings

func InvalidateManagedEmbeddings(node *storage.Node)

InvalidateManagedEmbeddings clears worker-managed embedding state on a node.

func IsMetadataPropertyKey

func IsMetadataPropertyKey(key string) bool

IsMetadataPropertyKey reports whether a property key is internal embedding metadata.

Types

type EmbedTextOptions

type EmbedTextOptions struct {
	Include       []string
	Exclude       []string
	IncludeLabels bool
}

EmbedTextOptions controls which properties and labels are used when building embedding text.

func EmbedTextOptionsFromConfig

func EmbedTextOptionsFromConfig(cfg *config.Config) *EmbedTextOptions

EmbedTextOptionsFromConfig maps runtime embedding worker config to text builder options.

func EmbedTextOptionsFromFields

func EmbedTextOptionsFromFields(include []string, exclude []string, includeLabels bool) *EmbedTextOptions

EmbedTextOptionsFromFields builds text options from raw include/exclude settings.

Jump to

Keyboard shortcuts

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