Documentation ¶
Index ¶
- Variables
- type DistributedStorage
- func (ds *DistributedStorage) Close() error
- func (ds *DistributedStorage) DeleteObject(id string) error
- func (ds *DistributedStorage) DeleteVector(id string) error
- func (ds *DistributedStorage) GetAllObjects() ([]*Object, error)
- func (ds *DistributedStorage) GetAllVectors() ([]*Vector, error)
- func (ds *DistributedStorage) GetObject(id string) (*Object, error)
- func (ds *DistributedStorage) GetVector(id string) (*Vector, error)
- func (ds *DistributedStorage) GetVectors(ids []string) ([]*Vector, error)
- func (ds *DistributedStorage) InsertObject(object *Object) error
- func (ds *DistributedStorage) InsertVector(vector *Vector) error
- func (ds *DistributedStorage) UpdateObjectMetadata(id string, metadata map[string]string) error
- func (ds *DistributedStorage) UpdateVectorMetadata(id string, metadata map[string]string) error
- type Object
- type QuantizationParams
- type Storage
- func (s *Storage) Close() error
- func (s *Storage) DeleteObject(id string) error
- func (s *Storage) DeleteVector(id string) error
- func (s *Storage) GetAllObjects() ([]*Object, error)
- func (s *Storage) GetAllVectors() ([]*Vector, error)
- func (s *Storage) GetObject(id string) (*Object, error)
- func (s *Storage) GetVector(id string) (*Vector, error)
- func (s *Storage) GetVectors(ids []string) ([]*Vector, error)
- func (s *Storage) InsertObject(object *Object) error
- func (s *Storage) InsertVector(vector *Vector) error
- func (s *Storage) UpdateObjectMetadata(id string, metadata map[string]string) error
- func (s *Storage) UpdateVectorMetadata(id string, metadata map[string]string) error
- type Vector
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotFound = errors.New("object not found")
View Source
var ErrObjectNotFound = errors.New("object not found")
View Source
var ErrVectorNotFound = errors.New("vector not found")
Functions ¶
This section is empty.
Types ¶
type DistributedStorage ¶ added in v1.0.11
type DistributedStorage struct {
// contains filtered or unexported fields
}
func NewDistributedStorage ¶ added in v1.0.11
func NewDistributedStorage(nodeAddresses []string) (*DistributedStorage, error)
func (*DistributedStorage) Close ¶ added in v1.0.11
func (ds *DistributedStorage) Close() error
func (*DistributedStorage) DeleteObject ¶ added in v1.0.12
func (ds *DistributedStorage) DeleteObject(id string) error
func (*DistributedStorage) DeleteVector ¶ added in v1.0.12
func (ds *DistributedStorage) DeleteVector(id string) error
func (*DistributedStorage) GetAllObjects ¶ added in v1.0.12
func (ds *DistributedStorage) GetAllObjects() ([]*Object, error)
func (*DistributedStorage) GetAllVectors ¶ added in v1.0.12
func (ds *DistributedStorage) GetAllVectors() ([]*Vector, error)
func (*DistributedStorage) GetObject ¶ added in v1.0.12
func (ds *DistributedStorage) GetObject(id string) (*Object, error)
func (*DistributedStorage) GetVector ¶ added in v1.0.12
func (ds *DistributedStorage) GetVector(id string) (*Vector, error)
func (*DistributedStorage) GetVectors ¶ added in v1.0.23
func (ds *DistributedStorage) GetVectors(ids []string) ([]*Vector, error)
func (*DistributedStorage) InsertObject ¶ added in v1.0.12
func (ds *DistributedStorage) InsertObject(object *Object) error
func (*DistributedStorage) InsertVector ¶ added in v1.0.12
func (ds *DistributedStorage) InsertVector(vector *Vector) error
func (*DistributedStorage) UpdateObjectMetadata ¶ added in v1.0.12
func (ds *DistributedStorage) UpdateObjectMetadata(id string, metadata map[string]string) error
func (*DistributedStorage) UpdateVectorMetadata ¶ added in v1.0.12
func (ds *DistributedStorage) UpdateVectorMetadata(id string, metadata map[string]string) error
type QuantizationParams ¶ added in v1.0.5
func (QuantizationParams) Dequantize ¶ added in v1.0.5
func (p QuantizationParams) Dequantize(value float64) float64
func (QuantizationParams) Quantize ¶ added in v1.0.5
func (p QuantizationParams) Quantize(value float64) float64
type Storage ¶
type Storage struct {
// contains filtered or unexported fields
}
func NewStorage ¶
func (*Storage) DeleteObject ¶ added in v1.0.12
func (*Storage) DeleteVector ¶ added in v1.0.12
func (*Storage) GetAllObjects ¶ added in v1.0.12
func (*Storage) GetAllVectors ¶ added in v1.0.12
func (*Storage) GetVectors ¶ added in v1.0.23
func (*Storage) InsertObject ¶ added in v1.0.12
func (*Storage) InsertVector ¶ added in v1.0.12
func (*Storage) UpdateObjectMetadata ¶ added in v1.0.12
type Vector ¶
type Vector struct { ID string Embedding []float64 Metadata map[string]string Text string Object []byte Compressed bool QuantizationParams *QuantizationParams PruningMask []bool SparseIndices []int Relevance float64 `json:"relevance"` }
func (*Vector) Quantize ¶ added in v1.0.5
func (v *Vector) Quantize(params QuantizationParams)
Click to show internal directories.
Click to hide internal directories.