Share via


NullMemory.RemoveAsync(String, String, Kernel, CancellationToken) Method

Definition

Remove a memory by key. For local memories the key is the "id" used when saving the record. For external reference, the key is the "URI" used when saving the record.

public System.Threading.Tasks.Task RemoveAsync (string collection, string key, Microsoft.SemanticKernel.Kernel? kernel = default, System.Threading.CancellationToken cancellationToken = default);
abstract member RemoveAsync : string * string * Microsoft.SemanticKernel.Kernel * System.Threading.CancellationToken -> System.Threading.Tasks.Task
override this.RemoveAsync : string * string * Microsoft.SemanticKernel.Kernel * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Function RemoveAsync (collection As String, key As String, Optional kernel As Kernel = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task

Parameters

collection
String

Collection to search.

key
String

Unique memory record identifier.

kernel
Kernel

The Kernel containing services, plugins, and other state for use throughout the operation.

cancellationToken
CancellationToken

The CancellationToken to monitor for cancellation requests. The default is None.

Returns

Implements

Applies to