memo

package
v0.0.0-...-20e2264 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New() vdb.VDB

New 创建新的内存向量存储实例

Types

type VDB

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

VDB 实现基于内存的向量存储

func (*VDB) Close

func (m *VDB) Close() error

Close 关闭并清理资源

func (*VDB) Delete

func (m *VDB) Delete(_ context.Context, id string) error

Delete 删除向量

func (*VDB) Search

func (m *VDB) Search(_ context.Context, vector []float64, options ...vdb.SearchOption) ([]vdb.Document, error)

Search 搜索最相似的向量

func (*VDB) SearchQuery

func (m *VDB) SearchQuery(_ context.Context, query string, options ...vdb.SearchOption) ([]vdb.Document, error)

SearchQuery 搜索最相似的向量

func (*VDB) Store

func (m *VDB) Store(_ context.Context, id string, vector []float64) error

Store 存储向量

Jump to

Keyboard shortcuts

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