plotembedding

package
v0.0.135 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EmbeddingVersionKey = "embedding_version"
	PlotEmbeddingKey    = "plot_embedding"
)
View Source
const (
	OwnerIDKey = "owner_id"
	VKey       = "v"
)

Variables

This section is empty.

Functions

func Idx

func Idx() []contract.IndexEntry

func IdxSrch

IdxSrch is the default search and vector index. INFO: For nested embeddings, dot notation is required.

func Rules

Types

type Comp

type Comp struct {
	EmbeddingVersion *string    `json:"embedding_version" validate:"nnpt,nz"`
	PlotEmbedding    *[]float32 `json:"plot_embedding" validate:"nnpt,nz"`
}

func (*Comp) GetEmbeddingVersion

func (c *Comp) GetEmbeddingVersion() string

func (*Comp) GetPlotEmbedding

func (c *Comp) GetPlotEmbedding() []float32

func (*Comp) SetEmbeddingVersion

func (c *Comp) SetEmbeddingVersion(x string)

func (*Comp) SetPlotEmbedding

func (c *Comp) SetPlotEmbedding(x []float32)

type Core

type Core struct {
	V *string `json:"v" validate:"nnpt,nz"`
}

func ApplyCore

func ApplyCore(c *Core, modifiers ...CoreOption) Core

func (*Core) GetV

func (c *Core) GetV() string

func (*Core) SetV

func (c *Core) SetV(x string)

type CoreOption

type CoreOption = contracti.CoreOption[Core]

func WithV

func WithV(x string) CoreOption

type Meta

type Meta struct{}

func ApplyMeta

func ApplyMeta(m *Meta, modifiers ...MetaOption) Meta

type MetaOption

type MetaOption = contract.MetaOption[Meta]

type PlotEmbedding

type PlotEmbedding struct {
	Meta `bson:",inline" validate:"recurse"`
	Comp `bson:",inline" validate:"recurse"`
	Core `bson:",inline" validate:"recurse"`
}

PlotEmbedding defines an embedding.

func Mock

func Mock(v string) *PlotEmbedding

func New

func New(m Meta, cr Core) *PlotEmbedding

func (*PlotEmbedding) Compute

func (r *PlotEmbedding) Compute(ctx context.Context, opts engine.ComputeOptions) error

Jump to

Keyboard shortcuts

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