collections

package
v0.14.1 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DumpTexts

func DumpTexts(ctx context.Context, collectionName, namespace string) (map[string]string, error)

func GetLabels

func GetLabels(ctx context.Context, collectionName, namespace, key string) ([]string, error)

func GetNamespaces

func GetNamespaces(ctx context.Context, collectionName string) ([]string, error)

func GetText

func GetText(ctx context.Context, collectionName, namespace, key string) (string, error)

func GetVector

func GetVector(ctx context.Context, collectionName, namespace, searchMethod, key string) ([]float32, error)

func Initialize

func Initialize(ctx context.Context)

func Shutdown

func Shutdown(ctx context.Context)

Types

type CollectionClassificationLabelObject

type CollectionClassificationLabelObject struct {
	Label      string
	Confidence float64
}

func NewCollectionClassificationLabelObject

func NewCollectionClassificationLabelObject(label string, confidence float64) *CollectionClassificationLabelObject

type CollectionClassificationResult

type CollectionClassificationResult struct {
	Collection   string
	SearchMethod string
	Status       string
	LabelsResult []*CollectionClassificationLabelObject
	Cluster      []*CollectionClassificationResultObject
	Error        string
}

func ClassifyText

func ClassifyText(ctx context.Context, collectionName, namespace, searchMethod, text string) (*CollectionClassificationResult, error)

func NewCollectionClassificationResult

func NewCollectionClassificationResult(collection, searchMethod, status string, labelsResult []*CollectionClassificationLabelObject, cluster []*CollectionClassificationResultObject, err string) *CollectionClassificationResult

type CollectionClassificationResultObject

type CollectionClassificationResultObject struct {
	Key      string
	Labels   []string
	Distance float64
	Score    float64
}

func NewCollectionClassificationResultObject

func NewCollectionClassificationResultObject(key string, labels []string, distance, score float64) *CollectionClassificationResultObject

type CollectionMutationResult

type CollectionMutationResult struct {
	Collection string
	Operation  string
	Status     string
	Keys       []string
	Error      string
}

func Delete

func Delete(ctx context.Context, collectionName, namespace, key string) (*CollectionMutationResult, error)

func NewCollectionMutationResult

func NewCollectionMutationResult(collection, operation, status string, keys []string, err string) *CollectionMutationResult

func Upsert

func Upsert(ctx context.Context, collectionName, namespace string, keys, texts []string, labels [][]string) (*CollectionMutationResult, error)

type CollectionSearchResult

type CollectionSearchResult struct {
	Collection   string
	SearchMethod string
	Status       string
	Objects      []*CollectionSearchResultObject
	Error        string
}

func NewCollectionSearchResult

func NewCollectionSearchResult(collection, searchMethod, status string, objects []*CollectionSearchResultObject, err string) *CollectionSearchResult
func Search(ctx context.Context, collectionName string, namespaces []string, searchMethod, text string, limit int32, returnText bool) (*CollectionSearchResult, error)

func SearchByVector

func SearchByVector(ctx context.Context, collectionName string, namespaces []string, searchMethod string, vector []float32, limit int32, returnText bool) (*CollectionSearchResult, error)

type CollectionSearchResultObject

type CollectionSearchResultObject struct {
	Namespace string
	Key       string
	Text      string
	Labels    []string
	Distance  float64
	Score     float64
}

func ComputeDistance

func ComputeDistance(ctx context.Context, collectionName, namespace, searchMethod, key1, key2 string) (*CollectionSearchResultObject, error)

func NewCollectionSearchResultObject

func NewCollectionSearchResultObject(namespace, key, text string, labels []string, distance, score float64) *CollectionSearchResultObject

type SearchMethodMutationResult

type SearchMethodMutationResult struct {
	Collection   string
	SearchMethod string
	Operation    string
	Status       string
	Error        string
}

func NewSearchMethodMutationResult

func NewSearchMethodMutationResult(collection, searchMethod, operation, status, err string) *SearchMethodMutationResult

func RecomputeIndex

func RecomputeIndex(ctx context.Context, collectionName, namespace, searchMethod string) (*SearchMethodMutationResult, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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