text2vecbase

package
v1.28.2 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2024 License: BSD-3-Clause Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BatchClient

type BatchClient[T types.Embedding] interface {
	batch.BatchClient[T]
	VectorizeQuery(ctx context.Context, input []string,
		cfg moduletools.ClassConfig) (*modulecomponents.VectorizationResult[T], error)
}

type BatchVectorizer

type BatchVectorizer[T types.Embedding] struct {
	// contains filtered or unexported fields
}

func New

func New[T types.Embedding](client BatchClient[T], batchVectorizer *batch.Batch[T], tokenizerFunc batch.TokenizerFuncType) *BatchVectorizer[T]

func (*BatchVectorizer[T]) Object

func (*BatchVectorizer[T]) ObjectBatch

func (v *BatchVectorizer[T]) ObjectBatch(ctx context.Context, objects []*models.Object, skipObject []bool, cfg moduletools.ClassConfig,
) ([]T, map[int]error)

func (*BatchVectorizer[T]) Texts

func (v *BatchVectorizer[T]) Texts(ctx context.Context, inputs []string,
	cfg moduletools.ClassConfig,
) (T, error)

type MetaProvider

type MetaProvider interface {
	MetaInfo() (map[string]interface{}, error)
}

type TextVectorizer

type TextVectorizer[T types.Embedding] interface {
	Object(ctx context.Context, object *models.Object,
		cfg moduletools.ClassConfig) (T, models.AdditionalProperties, error)
	Texts(ctx context.Context, input []string,
		cfg moduletools.ClassConfig) (T, error)
}

type TextVectorizerBatch

type TextVectorizerBatch[T types.Embedding] interface {
	Texts(ctx context.Context, input []string,
		cfg moduletools.ClassConfig) (T, error)
	Object(ctx context.Context, object *models.Object,
		cfg moduletools.ClassConfig, cs objectsvectorizer.ClassSettings) (T, models.AdditionalProperties, error)
	ObjectBatch(ctx context.Context, objects []*models.Object, skipObject []bool, cfg moduletools.ClassConfig) ([]T, map[int]error)
}

Jump to

Keyboard shortcuts

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