multimodal

package
v0.9.2 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// EncoderCacheMatchInfoKey is attached to endpoints by the multimodal data
	// producer and consumed by scorer/latency plugins that need encoder-cache locality.
	EncoderCacheMatchInfoKey = plugin.NewDataKey("MultiModalEncoderCacheMatchInfoKey", "mm-embeddings-cache-producer")
)

Functions

This section is empty.

Types

type EncoderCacheMatchInfo

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

EncoderCacheMatchInfo carries endpoint-local multimodal cache match data. Consumers choose how to interpret item sizes and compute scores.

func NewEncoderCacheMatchInfo

func NewEncoderCacheMatchInfo(matchedItems []MatchItem, requestItems []MatchItem) *EncoderCacheMatchInfo

NewEncoderCacheMatchInfo creates endpoint-local multimodal cache match data.

func (*EncoderCacheMatchInfo) Clone

Clone implements datalayer.Cloneable.

func (*EncoderCacheMatchInfo) MatchedItems

func (m *EncoderCacheMatchInfo) MatchedItems() []MatchItem

MatchedItems returns endpoint-local request items that are likely already cached.

func (*EncoderCacheMatchInfo) RequestItems

func (m *EncoderCacheMatchInfo) RequestItems() []MatchItem

RequestItems returns all unique multimodal request items.

type MatchItem

type MatchItem struct {
	Hash string
	Size int
	// Modality is emitted as a metric label.
	Modality string
}

MatchItem describes one unique multimodal item involved in encoder-cache affinity matching.

func CloneMatchItems

func CloneMatchItems(items []MatchItem) []MatchItem

CloneMatchItems creates a deep copy of a MatchItem slice.

Jump to

Keyboard shortcuts

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