Documentation
¶
Index ¶
- Constants
- func DimKeyFn(prefix string) string
- func EmbeddingVersionKeyFn(prefix string) string
- func Idx(prefix string) []contract.IndexEntry
- func IdxSrch(opts []contract.EmbeddingOptions) []contract.SearchIndexEntry
- func ModalityKeyFn(prefix string) string
- func PlotEmbeddingKeyFn(prefix string) string
- func Rules() contractpkg.QueryParamRules
- func TextKeyFn(prefix string) string
- type Comp
- type Core
- type CoreOption
- type Meta
- type MetaOption
- type PlotEmbedding
Constants ¶
View Source
const ( VKey = "v" EmbeddingVersionKey = "embedding_version" DimKey = "dim" NormalizedKey = "normalized" ModalityKey = "modality" PlotEmbeddingKey = "plot_embedding" )
View Source
const ( TextKey = "text" FileKey = "file" FileURLKey = "file_url" MIMEKey = "mime" )
Variables ¶
This section is empty.
Functions ¶
func EmbeddingVersionKeyFn ¶ added in v0.0.186
func Idx ¶
func Idx(prefix string) []contract.IndexEntry
func IdxSrch ¶
func IdxSrch(opts []contract.EmbeddingOptions) []contract.SearchIndexEntry
func ModalityKeyFn ¶ added in v0.0.186
func PlotEmbeddingKeyFn ¶ added in v0.0.186
func Rules ¶
func Rules() contractpkg.QueryParamRules
Types ¶
type Comp ¶
type Comp struct {
contract.EmbedR `bson:",inline" validate:"recurse"`
PlotEmbedding *[]float32 `json:"plot_embedding" validate:"nnpt,nz"`
}
func (*Comp) GetPlotEmbedding ¶
func (*Comp) SetPlotEmbedding ¶
type CoreOption ¶
type CoreOption = contracti.CoreOption[Core]
func WithEmbedC ¶ added in v0.0.136
func WithEmbedC(x contract.EmbedC) 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(e contract.EmbedC) *PlotEmbedding
func MockWithComp ¶ added in v0.0.177
func MockWithComp(e contract.EmbedC, mod contract.Modality) *PlotEmbedding
func New ¶
func New(m Meta, cr Core) *PlotEmbedding
func (*PlotEmbedding) Compute ¶
func (r *PlotEmbedding) Compute(ctx context.Context, op contract.EmbedderOperator, noop bool) error
Click to show internal directories.
Click to hide internal directories.