| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
|
|
| package modulecapabilities |
|
|
| import ( |
| "context" |
|
|
| "github.com/go-openapi/strfmt" |
| "github.com/weaviate/weaviate/entities/additional" |
| "github.com/weaviate/weaviate/entities/dto" |
| "github.com/weaviate/weaviate/entities/models" |
| "github.com/weaviate/weaviate/entities/moduletools" |
| "github.com/weaviate/weaviate/entities/search" |
| ) |
|
|
| type Vectorizer[T dto.Embedding] interface { |
| |
| |
| VectorizeObject(ctx context.Context, obj *models.Object, |
| cfg moduletools.ClassConfig) (T, models.AdditionalProperties, error) |
| |
| |
| |
| VectorizableProperties(cfg moduletools.ClassConfig) (bool, []string, error) |
| VectorizeBatch(ctx context.Context, objs []*models.Object, skipObject []bool, cfg moduletools.ClassConfig) ([]T, []models.AdditionalProperties, map[int]error) |
| } |
|
|
| type FindObjectFn = func(ctx context.Context, class string, id strfmt.UUID, |
| props search.SelectProperties, adds additional.Properties, tenant string) (*search.Result, error) |
|
|
| |
| |
| |
| type ReferenceVectorizer[T dto.Embedding] interface { |
| |
| |
| VectorizeObject(ctx context.Context, object *models.Object, |
| cfg moduletools.ClassConfig, findObjectFn FindObjectFn) (T, error) |
| } |
|
|
| type InputVectorizer[T dto.Embedding] interface { |
| VectorizeInput(ctx context.Context, input string, |
| cfg moduletools.ClassConfig) (T, error) |
| } |
|
|