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 ¶
func IdxSrch(e []contract.EmbeddingFieldsOptions) []contract.SearchIndexEntry
IdxSrch is the default search and vector index. INFO: For nested embeddings, dot notation is required.
func Rules ¶
func Rules() contractpkg.QueryParamRules
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 (*Comp) GetPlotEmbedding ¶
func (*Comp) SetEmbeddingVersion ¶
func (*Comp) SetPlotEmbedding ¶
type Core ¶
type Core struct {
V *string `json:"v" validate:"nnpt,nz"`
}
func ApplyCore ¶
func ApplyCore(c *Core, modifiers ...CoreOption) Core
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
Click to show internal directories.
Click to hide internal directories.