MemoryRecord.FromJsonMetadata Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Create a memory record from a serialized metadata string.
public static Microsoft.SemanticKernel.Memory.MemoryRecord FromJsonMetadata (string json, ReadOnlyMemory<float> embedding, string? key = default, DateTimeOffset? timestamp = default);
static member FromJsonMetadata : string * ReadOnlyMemory<single> * string * Nullable<DateTimeOffset> -> Microsoft.SemanticKernel.Memory.MemoryRecord
Public Shared Function FromJsonMetadata (json As String, embedding As ReadOnlyMemory(Of Single), Optional key As String = Nothing, Optional timestamp As Nullable(Of DateTimeOffset) = Nothing) As MemoryRecord
Parameters
- json
- String
Json string representing a memory record's metadata.
- embedding
- ReadOnlyMemory<Single>
Optional embedding associated with a memory record.
- key
- String
Optional existing database key.
- timestamp
- Nullable<DateTimeOffset>
optional timestamp.
Returns
Memory record
Exceptions
Microsoft.SemanticKernel.Diagnostics.SKException