Documentation ¶
Index ¶
- Constants
- func NewClassSettings(cfg moduletools.ClassConfig) *classSettings
- type ClassSettings
- type Client
- type Vectorizer
- func (v *Vectorizer) CombineVectors(vectors [][]float32) []float32
- func (v *Vectorizer) MoveAwayFrom(source []float32, target []float32, weight float32) ([]float32, error)
- func (v *Vectorizer) MoveTo(source []float32, target []float32, weight float32) ([]float32, error)
- func (v *Vectorizer) Object(ctx context.Context, object *models.Object, objDiff *moduletools.ObjectDiff, ...) error
- func (v *Vectorizer) Texts(ctx context.Context, inputs []string, settings ClassSettings) ([]float32, error)
- func (v *Vectorizer) VectorizeInput(ctx context.Context, input string, icheck vectorizer.ClassIndexCheck) ([]float32, error)
Constants ¶
Variables ¶
This section is empty.
Functions ¶
func NewClassSettings ¶
func NewClassSettings(cfg moduletools.ClassConfig) *classSettings
Types ¶
type ClassSettings ¶
type ClassSettings interface { PropertyIndexed(property string) bool VectorizePropertyName(propertyName string) bool VectorizeClassName() bool EndpointURL() string PassageModel() string QueryModel() string OptionWaitForModel() bool OptionUseGPU() bool OptionUseCache() bool }
IndexCheck returns whether a property of a class should be indexed
type Client ¶
type Client interface { Vectorize(ctx context.Context, input string, config ent.VectorizationConfig) (*ent.VectorizationResult, error) VectorizeQuery(ctx context.Context, input string, config ent.VectorizationConfig) (*ent.VectorizationResult, error) }
type Vectorizer ¶
type Vectorizer struct {
// contains filtered or unexported fields
}
func New ¶
func New(client Client) *Vectorizer
func (*Vectorizer) CombineVectors ¶
func (v *Vectorizer) CombineVectors(vectors [][]float32) []float32
CombineVectors combines all of the vector into sum of their parts
func (*Vectorizer) MoveAwayFrom ¶
func (v *Vectorizer) MoveAwayFrom(source []float32, target []float32, weight float32, ) ([]float32, error)
MoveAwayFrom moves one vector away from another
func (*Vectorizer) MoveTo ¶
func (v *Vectorizer) MoveTo(source []float32, target []float32, weight float32, ) ([]float32, error)
MoveTo moves one vector toward another
func (*Vectorizer) Object ¶
func (v *Vectorizer) Object(ctx context.Context, object *models.Object, objDiff *moduletools.ObjectDiff, settings ClassSettings, ) error
func (*Vectorizer) Texts ¶
func (v *Vectorizer) Texts(ctx context.Context, inputs []string, settings ClassSettings, ) ([]float32, error)
func (*Vectorizer) VectorizeInput ¶
func (v *Vectorizer) VectorizeInput(ctx context.Context, input string, icheck vectorizer.ClassIndexCheck, ) ([]float32, error)
Click to show internal directories.
Click to hide internal directories.