collections

package
v0.17.1 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2025 License: Apache-2.0 Imports: 2 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ComputeDistanceCallStack = testutils.NewCallStack()
View Source
var DeleteCallStack = testutils.NewCallStack()
View Source
var GetLabelsCallStack = testutils.NewCallStack()
View Source
var GetNamespacesCallStack = testutils.NewCallStack()
View Source
var GetTextCallStack = testutils.NewCallStack()
View Source
var GetTextsCallStack = testutils.NewCallStack()
View Source
var GetVectorCallStack = testutils.NewCallStack()
View Source
var NnClassifyCallStack = testutils.NewCallStack()
View Source
var RecomputeSearchMethodCallStack = testutils.NewCallStack()
View Source
var SearchByVectorCallStack = testutils.NewCallStack()
View Source
var SearchCallStack = testutils.NewCallStack()
View Source
var UpsertCallStack = testutils.NewCallStack()

Functions

func GetLabels

func GetLabels(collection, key string, opts ...NamespaceOption) ([]string, error)

func GetNamespaces

func GetNamespaces(collection string) ([]string, error)

func GetText

func GetText(collection, key string, opts ...NamespaceOption) (string, error)

func GetTexts

func GetTexts(collection string, opts ...NamespaceOption) (map[string]string, error)

func GetVector

func GetVector(collection, searchMethod, key string, opts ...NamespaceOption) ([]float32, error)

Types

type CollectionClassificationLabelObject

type CollectionClassificationLabelObject struct {
	Label      string
	Confidence float64
}

type CollectionClassificationResult

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

func NnClassify

func NnClassify(collection, searchMethod, text string, opts ...NamespaceOption) (*CollectionClassificationResult, error)

type CollectionClassificationResultObject

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

type CollectionMutationResult

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

func Remove

func Remove(collection, key string, opts ...NamespaceOption) (*CollectionMutationResult, error)

func Upsert

func Upsert(collection string, key *string, text string, labels []string, opts ...NamespaceOption) (*CollectionMutationResult, error)

func UpsertBatch

func UpsertBatch(collection string, keys []string, texts []string, labelsArr [][]string, opts ...NamespaceOption) (*CollectionMutationResult, error)

type CollectionSearchResult

type CollectionSearchResult struct {
	Collection   string
	Status       string
	Error        string
	SearchMethod string
	Objects      []*CollectionSearchResultObject
}
func Search(collection, searchMethod, text string, opts ...SearchOption) (*CollectionSearchResult, error)

func SearchByVector

func SearchByVector(collection, searchMethod string, vector []float32, opts ...SearchOption) (*CollectionSearchResult, error)

type CollectionSearchResultObject

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

func ComputeDistance

func ComputeDistance(collection, searchMethod, key1, key2 string, opts ...NamespaceOption) (*CollectionSearchResultObject, error)

type CollectionStatus

type CollectionStatus = string
const (
	Success CollectionStatus = "success"
	Error   CollectionStatus = "error"
)

type NamespaceOption

type NamespaceOption func(*NamespaceOptions)

func WithNamespace

func WithNamespace(namespace string) NamespaceOption

type NamespaceOptions

type NamespaceOptions struct {
	// contains filtered or unexported fields
}

type SearchMethodMutationResult

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

func RecomputeSearchMethod

func RecomputeSearchMethod(collection, searchMethod string, opts ...NamespaceOption) (*SearchMethodMutationResult, error)

type SearchOption

type SearchOption func(*SearchOptions)

func WithLimit

func WithLimit(limit int) SearchOption

func WithNamespaces

func WithNamespaces(namespaces []string) SearchOption

func WithReturnText

func WithReturnText(returnText bool) SearchOption

type SearchOptions

type SearchOptions struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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