Share via


MemoryRecord.FromMetadata Method

Definition

Create a memory record from a memory record's metadata.

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

Parameters

metadata
MemoryRecordMetadata

Metadata associated with a memory.

embedding
ReadOnlyMemory<Single>

Optional embedding associated with a memory record.

key
String

Optional existing database key.

timestamp
Nullable<DateTimeOffset>

optional timestamp.

Returns

Memory record

Applies to