KustoMemoryStore Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
An implementation of IMemoryStore backed by a Kusto database.
public class KustoMemoryStore : IDisposable, Microsoft.SemanticKernel.Memory.IMemoryStore
type KustoMemoryStore = class
interface IMemoryStore
interface IDisposable
Public Class KustoMemoryStore
Implements IDisposable, IMemoryStore
- Inheritance
-
KustoMemoryStore
- Implements
Remarks
The embedded data is saved to the Kusto database specified in the constructor. Similarity search capability is provided through a cosine similarity function (added on first search operation). Use Kusto's "Table" to implement "Collection".
Constructors
KustoMemoryStore(ICslAdminProvider, ICslQueryProvider, String) |
Initializes a new instance of the KustoMemoryStore class. |
KustoMemoryStore(KustoConnectionStringBuilder, String) |
Initializes a new instance of the KustoMemoryStore class. |
Methods
CreateCollectionAsync(String, CancellationToken) |
Creates a new collection in the data store. |
DeleteCollectionAsync(String, CancellationToken) |
Deletes a collection from the data store. |
Dispose() |
Disposes the KustoMemoryStore instance. |
Dispose(Boolean) |
Disposes the resources used by the KustoMemoryStore instance. |
DoesCollectionExistAsync(String, CancellationToken) |
Determines if a collection exists in the data store. |
GetAsync(String, String, Boolean, CancellationToken) |
Gets a memory record from the data store. Does not guarantee that the collection exists. |
GetBatchAsync(String, IEnumerable<String>, Boolean, CancellationToken) |
Gets a batch of memory records from the data store. Does not guarantee that the collection exists. |
GetCollectionsAsync(CancellationToken) |
Gets all collection names in the data store. |
GetNearestMatchAsync(String, ReadOnlyMemory<Single>, Double, Boolean, CancellationToken) |
Gets the nearest match to an embedding of type Single. Does not guarantee that the collection exists. |
GetNearestMatchesAsync(String, ReadOnlyMemory<Single>, Int32, Double, Boolean, CancellationToken) |
Gets the nearest matches to an embedding of type Single. Does not guarantee that the collection exists. |
RemoveAsync(String, String, CancellationToken) |
Removes a memory record from the data store. Does not guarantee that the collection exists. |
RemoveBatchAsync(String, IEnumerable<String>, CancellationToken) |
Removes a batch of memory records from the data store. Does not guarantee that the collection exists. |
UpsertAsync(String, MemoryRecord, CancellationToken) |
Upserts a memory record into the data store. Does not guarantee that the collection exists. If the record already exists, it will be updated. If the record does not exist, it will be created. |
UpsertBatchAsync(String, IEnumerable<MemoryRecord>, CancellationToken) |
Upserts a group of memory records into the data store. Does not guarantee that the collection exists. If the record already exists, it will be updated. If the record does not exist, it will be created. |