embedstore

package
v0.8.6 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2023 License: MIT Imports: 9 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TightenSearchResults added in v0.8.6

func TightenSearchResults(searchResults []types.SearchResult) types.SearchResults

Sorts search results in a way that preserves original order based on filenames

Types

type EmbedStore

type EmbedStore struct {
	types.UnimplementedTGenerator
}

func NewEmbedStore

func NewEmbedStore() (*EmbedStore, error)

func (*EmbedStore) AddEmbeddingDocument

func (idx *EmbedStore) AddEmbeddingDocument(ctx context.Context, docID string, embedding [1536]float32, metadata types.Metadata) error

func (*EmbedStore) AddEmbeddingDocuments

func (idx *EmbedStore) AddEmbeddingDocuments(ctx context.Context, vectors []types.Vector) (int, error)

func (*EmbedStore) DeleteEmbeddingDocument

func (idx *EmbedStore) DeleteEmbeddingDocument(ctx context.Context, docID string) error

func (*EmbedStore) DeleteEmbeddingDocuments

func (idx *EmbedStore) DeleteEmbeddingDocuments(ctx context.Context, docIDs []string) error

func (*EmbedStore) GetEmbeddingDocument

func (idx *EmbedStore) GetEmbeddingDocument(ctx context.Context, docID string) (types.Vector, bool, error)

func (*EmbedStore) ListAllEmbeddingsIds

func (idx *EmbedStore) ListAllEmbeddingsIds(ctx context.Context) (types.SearchResults, error)

func (*EmbedStore) SearchWithEmbedding

func (idx *EmbedStore) SearchWithEmbedding(ctx context.Context, embedding types.QueryFilter, k int) (types.SearchResults, error)

Jump to

Keyboard shortcuts

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