Class MemoryManager
Unified memory manager that combines embedding + vector store.
public sealed class MemoryManager
- Inheritance
-
MemoryManager
- Inherited Members
Constructors
MemoryManager(IEmbeddingProvider, IVectorStore)
public MemoryManager(IEmbeddingProvider embedder, IVectorStore store)
Parameters
embedderIEmbeddingProviderstoreIVectorStore
Methods
IndexAsync(IReadOnlyList<(string Id, string Content, string? Source, string? Category)>, CancellationToken)
Indexes content into the vector store.
public Task IndexAsync(IReadOnlyList<(string Id, string Content, string? Source, string? Category)> items, CancellationToken ct = default)
Parameters
itemsIReadOnlyList<(string Id, string Content, string Source, string Category)>ctCancellationToken
Returns
SearchAsync(string, int, string?, CancellationToken)
Searches memory with a natural language query.
public Task<IReadOnlyList<MemorySearchResult>> SearchAsync(string query, int topK = 5, string? categoryFilter = null, CancellationToken ct = default)
Parameters
querystringtopKintcategoryFilterstringctCancellationToken