Partager via


MemoryRecord.LocalRecord Method

Definition

Prepare an instance for a memory stored in the internal storage provider.

public static Microsoft.SemanticKernel.Memory.MemoryRecord LocalRecord (string id, string text, string? description, ReadOnlyMemory<float> embedding, string? additionalMetadata = default, string? key = default, DateTimeOffset? timestamp = default);
static member LocalRecord : string * string * string * ReadOnlyMemory<single> * string * string * Nullable<DateTimeOffset> -> Microsoft.SemanticKernel.Memory.MemoryRecord
Public Shared Function LocalRecord (id As String, text As String, description As String, embedding As ReadOnlyMemory(Of Single), Optional additionalMetadata As String = Nothing, Optional key As String = Nothing, Optional timestamp As Nullable(Of DateTimeOffset) = Nothing) As MemoryRecord

Parameters

id
String

Resource identifier within the storage provider, e.g. record ID/GUID/incremental counter etc.

text
String

Full text used to generate the embeddings.

description
String

Optional description of the record. Note: the description is not indexed.

embedding
ReadOnlyMemory<Single>

Source content embedding.

additionalMetadata
String

Optional string for saving custom metadata.

key
String

Optional existing database key.

timestamp
Nullable<DateTimeOffset>

Optional timestamp.

Returns

Memory record

Applies to