Compartilhar via


Embedding Class

Definition

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

public ref class Embedding
[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
[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
[<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")>]
type Embedding = class
[<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")>]
type Embedding = class
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.

Methods

Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
ToString()

Returns a string that represents the current object.

(Inherited from Object)

Applies to