NullMemory.SaveReferenceAsync Method

Definition

Save some information into the semantic memory, keeping only a reference to the source information.

public System.Threading.Tasks.Task<string> SaveReferenceAsync (string collection, string text, string externalId, string externalSourceName, string? description = default, string? additionalMetadata = default, Microsoft.SemanticKernel.Kernel? kernel = default, System.Threading.CancellationToken cancellationToken = default);
abstract member SaveReferenceAsync : string * string * string * string * string * string * Microsoft.SemanticKernel.Kernel * System.Threading.CancellationToken -> System.Threading.Tasks.Task<string>
override this.SaveReferenceAsync : string * string * string * string * string * string * Microsoft.SemanticKernel.Kernel * System.Threading.CancellationToken -> System.Threading.Tasks.Task<string>
Public Function SaveReferenceAsync (collection As String, text As String, externalId As String, externalSourceName 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.

externalId
String

Unique identifier, e.g. URL or GUID to the original source.

externalSourceName
String

Name of the external service, e.g. "MSTeams", "GitHub", "WebSite", "Outlook IMAP", etc.

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