Przeczytaj w języku angielskim

Udostępnij za pośrednictwem


Embedding Class

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.

Represents an embedding generated by a IEmbeddingGenerator<TInput,TEmbedding>.

C#
[System.Text.Json.Serialization.JsonDerivedType(typeof(Microsoft.Extensions.AI.Embedding<System.Half>), "halves")]
[System.Text.Json.Serialization.JsonDerivedType(typeof(Microsoft.Extensions.AI.Embedding<System.Single>), "floats")]
[System.Text.Json.Serialization.JsonDerivedType(typeof(Microsoft.Extensions.AI.Embedding<System.Double>), "doubles")]
[System.Text.Json.Serialization.JsonDerivedType(typeof(Microsoft.Extensions.AI.Embedding<System.Byte>), "bytes")]
[System.Text.Json.Serialization.JsonDerivedType(typeof(Microsoft.Extensions.AI.Embedding<System.SByte>), "sbytes")]
[System.Text.Json.Serialization.JsonPolymorphic(TypeDiscriminatorPropertyName="$type")]
public class Embedding
C#
[System.Text.Json.Serialization.JsonDerivedType(typeof(Microsoft.Extensions.AI.Embedding<System.Single>), "floats")]
[System.Text.Json.Serialization.JsonDerivedType(typeof(Microsoft.Extensions.AI.Embedding<System.Double>), "doubles")]
[System.Text.Json.Serialization.JsonDerivedType(typeof(Microsoft.Extensions.AI.Embedding<System.Byte>), "bytes")]
[System.Text.Json.Serialization.JsonDerivedType(typeof(Microsoft.Extensions.AI.Embedding<System.SByte>), "sbytes")]
[System.Text.Json.Serialization.JsonPolymorphic(TypeDiscriminatorPropertyName="$type")]
public class Embedding
Inheritance
Embedding
Derived
Attributes

Remarks

This base class provides metadata about the embedding. Derived types provide the concrete data contained in the embedding.

Constructors

Embedding()

Initializes a new instance of the Embedding class.

Properties

AdditionalProperties

Gets or sets any additional properties associated with the embedding.

CreatedAt

Gets or sets a timestamp at which the embedding was created.

ModelId

Gets or sets the model ID using in the creation of the embedding.

Applies to

Produkt Wersje
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Standard 2.0 (package-provided)