MCPcopy Create free account
hub / github.com/astercloud/aster / NewMemoryStore

Function NewMemoryStore

pkg/vector/memory_store.go:19–24  ·  view source on GitHub ↗

NewMemoryStore 创建内存向量存储。

()

Source from the content-addressed store, hash-verified

17
18// NewMemoryStore 创建内存向量存储。
19func NewMemoryStore() *MemoryStore {
20 return &MemoryStore{
21 docs: make(map[string]Document),
22 index: make(map[string][]string),
23 }
24}
25
26// Upsert 将文档插入或更新到内存存储。
27func (s *MemoryStore) Upsert(_ context.Context, docs []Document) error {

Callers 11

TestFactory_AddAndSearchFunction · 0.92
createMemoryStoreFunction · 0.92
TestPipeline_IngestEmptyFunction · 0.92
TestPipeline_EmptyTextFunction · 0.92
DefaultInMemoryPipelineFunction · 0.92
mainFunction · 0.92
mainFunction · 0.92
mainFunction · 0.92
mainFunction · 0.92

Calls

no outgoing calls

Tested by 5

TestFactory_AddAndSearchFunction · 0.74
TestPipeline_IngestEmptyFunction · 0.74
TestPipeline_EmptyTextFunction · 0.74