memory

package
v0.0.0-...-aa8845d Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Memory

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

Memory is an in-memory vector store.

func New

func New() *Memory

func (*Memory) Delete

func (m *Memory) Delete(ctx context.Context, vendor string, sourceIDs ...string) error

Delete deletes the chunks belonging to the given sourceIDs. As a special case, empty documentIDs means deleting all chunks.

func (*Memory) Query

func (m *Memory) Query(ctx context.Context, vendor string, vector []float64, topK int, minScore float64) ([]*api.Similarity, error)

func (*Memory) Upsert

func (m *Memory) Upsert(ctx context.Context, vendor string, documents []*api.Document) error

Jump to

Keyboard shortcuts

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