batchclip

package
v1.35.0 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2025 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BatchCLIPVectorizer

type BatchCLIPVectorizer[T dto.Embedding] struct {
	// contains filtered or unexported fields
}

func (*BatchCLIPVectorizer[T]) Object

func (*BatchCLIPVectorizer[T]) Objects

func (*BatchCLIPVectorizer[T]) Texts

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

func (*BatchCLIPVectorizer[T]) VectorizeImage

func (v *BatchCLIPVectorizer[T]) VectorizeImage(ctx context.Context,
	id, image string, cfg moduletools.ClassConfig,
) (T, error)

type Client

type Client[T dto.Embedding] interface {
	VectorizeImages(ctx context.Context,
		images []string, cfg moduletools.ClassConfig,
	) (*modulecomponents.VectorizationCLIPResult[T], error)
	VectorizeQuery(ctx context.Context,
		texts []string, cfg moduletools.ClassConfig,
	) (*modulecomponents.VectorizationCLIPResult[T], error)
	Vectorize(ctx context.Context,
		texts, images []string, cfg moduletools.ClassConfig,
	) (*modulecomponents.VectorizationCLIPResult[T], error)
}

type Vectorizer

type Vectorizer[T dto.Embedding] interface {
	VectorizeImage(ctx context.Context,
		id, image string, cfg moduletools.ClassConfig,
	) (T, error)
	Texts(ctx context.Context,
		input []string, cfg moduletools.ClassConfig,
	) (T, error)
	Object(ctx context.Context,
		obj *models.Object, cfg moduletools.ClassConfig,
	) (T, models.AdditionalProperties, error)
	Objects(ctx context.Context,
		objs []*models.Object, cfg moduletools.ClassConfig,
	) ([]T, models.AdditionalProperties, error)
}

func New

func New[T dto.Embedding](moduleName string, client Client[T]) Vectorizer[T]

func NewWithAltNames

func NewWithAltNames[T dto.Embedding](moduleName string, altNames []string, client Client[T]) Vectorizer[T]

Jump to

Keyboard shortcuts

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