Partager via


NullMemory.SaveInformationAsync Method

Definition

Save some information into the semantic memory, keeping a copy of the source information.

public System.Threading.Tasks.Task<string> SaveInformationAsync (string collection, string text, string id, string? description = default, string? additionalMetadata = default, Microsoft.SemanticKernel.Kernel? kernel = default, System.Threading.CancellationToken cancellationToken = default);
abstract member SaveInformationAsync : string * string * string * string * string * Microsoft.SemanticKernel.Kernel * System.Threading.CancellationToken -> System.Threading.Tasks.Task<string>
override this.SaveInformationAsync : string * string * string * string * string * Microsoft.SemanticKernel.Kernel * System.Threading.CancellationToken -> System.Threading.Tasks.Task<string>
Public Function SaveInformationAsync (collection As String, text As String, id As String, Optional description As String = Nothing, Optional additionalMetadata As String = Nothing, Optional kernel As Kernel = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of String)

Parameters

collection
String

Collection where to save the information.

text
String

Information to save.

id
String

Unique identifier.

description
String

Optional description.

additionalMetadata
String

Optional string for saving custom metadata.

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

Unique identifier of the saved memory record.

Implements

Applies to