Partager via


MemoryQueryResult Constructor

Definition

Create a new instance of MemoryQueryResult

[System.Text.Json.Serialization.JsonConstructor]
public MemoryQueryResult (Microsoft.SemanticKernel.Memory.MemoryRecordMetadata metadata, double relevance, ReadOnlyMemory<float>? embedding);
[<System.Text.Json.Serialization.JsonConstructor>]
new Microsoft.SemanticKernel.Memory.MemoryQueryResult : Microsoft.SemanticKernel.Memory.MemoryRecordMetadata * double * Nullable<ReadOnlyMemory<single>> -> Microsoft.SemanticKernel.Memory.MemoryQueryResult
Public Sub New (metadata As MemoryRecordMetadata, relevance As Double, embedding As Nullable(Of ReadOnlyMemory(Of Single)))

Parameters

metadata
MemoryRecordMetadata

Whether the source data used to calculate embeddings are stored in the local storage provider or is available through an external service, such as web site, MS Graph, etc.

relevance
Double

Search relevance, from 0 to 1, where 1 means perfect match.

embedding
Nullable<ReadOnlyMemory<Single>>

Optional embedding associated with the metadata.

Attributes

Applies to