Language

MultimodalDenseAndMultiVectorEmbedding Class

Definition

The result for one item when vectorKind is dense_multi: a dense vector and one vector per token, from one model run.

public class MultimodalDenseAndMultiVectorEmbedding : Azure.Data.AI.EmbeddingItem, System.ClientModel.Primitives.IJsonModel<Azure.Data.AI.MultimodalDenseAndMultiVectorEmbedding>, System.ClientModel.Primitives.IPersistableModel<Azure.Data.AI.MultimodalDenseAndMultiVectorEmbedding>
type MultimodalDenseAndMultiVectorEmbedding = class
    inherit EmbeddingItem
    interface IJsonModel<MultimodalDenseAndMultiVectorEmbedding>
    interface IPersistableModel<MultimodalDenseAndMultiVectorEmbedding>
Public Class MultimodalDenseAndMultiVectorEmbedding
Inherits EmbeddingItem
Implements IJsonModel(Of MultimodalDenseAndMultiVectorEmbedding), IPersistableModel(Of MultimodalDenseAndMultiVectorEmbedding)
Inheritance
MultimodalDenseAndMultiVectorEmbedding
Implements

Properties

Name Description
ContentKind

The item's content kind, as supplied in the request's kind.

Embedding

The dense vector: an array of numbers, or, when encodingFormat is base64, a base64 string of its little-endian outputDataKind values.

To assign an object to this property use FromObjectAsJson<T>(T, JsonSerializerOptions).

To assign an already formatted json string to this property use FromString(String).

<remarks> Supported types:

</remarks>

Examples:

  • BinaryData.FromObjectAsJson("foo"). : Creates a payload of "foo".
  • BinaryData.FromString("\"foo\""). : Creates a payload of "foo".
  • BinaryData.FromObjectAsJson(new { key = "value" }). : Creates a payload of { "key": "value" }.
  • BinaryData.FromString("{\"key\": \"value\"}"). : Creates a payload of { "key": "value" }.

Format

For images: the detected image format.

Height

For images: the height in pixels.

Id

The item's id from the request, if it had one.

(Inherited from EmbeddingItem)
Index

The zero-based position of the item in the request.

(Inherited from EmbeddingItem)
InputTokens

For truncated items only: the item's tokens before truncation.

IsTruncated

true when the item was over the model's token limit and only its start was embedded; warnings then has an EMBEDDING_INPUT_TRUNCATED entry for it. Omitted otherwise.

MultiEmbedding

The multi-vectors: an array of arrays of numbers, or, when encodingFormat is base64, one base64 string of all their little-endian outputDataKind values in row-major order. Decode it and reshape it to shape.

To assign an object to this property use FromObjectAsJson<T>(T, JsonSerializerOptions).

To assign an already formatted json string to this property use FromString(String).

<remarks> Supported types:

</remarks>

Examples:

  • BinaryData.FromObjectAsJson("foo"). : Creates a payload of "foo".
  • BinaryData.FromString("\"foo\""). : Creates a payload of "foo".
  • BinaryData.FromObjectAsJson(new { key = "value" }). : Creates a payload of { "key": "value" }.
  • BinaryData.FromString("{\"key\": \"value\"}"). : Creates a payload of { "key": "value" }.

Shape

The number of multi-vectors and their number of dimensions: [vectors, multiDimensions].

Tokens

The tokens the model read for this item, including any text the service adds to queries and, for images, the image prompt and image tokens. For a truncated item, the tokens embedded. Omitted when the model doesn't report it.

VectorKind

The kind of vectors returned.

VisualTokens

For images: how many of tokens were image tokens.

Width

For images: the width in pixels.

Methods

Name Description
JsonModelCreateCore(Utf8JsonReader, ModelReaderWriterOptions)
JsonModelWriteCore(Utf8JsonWriter, ModelReaderWriterOptions)
PersistableModelCreateCore(BinaryData, ModelReaderWriterOptions)
PersistableModelWriteCore(ModelReaderWriterOptions)

Explicit Interface Implementations

Name Description
IJsonModel<EmbeddingItem>.Create(Utf8JsonReader, ModelReaderWriterOptions) (Inherited from EmbeddingItem)
IJsonModel<EmbeddingItem>.Write(Utf8JsonWriter, ModelReaderWriterOptions) (Inherited from EmbeddingItem)
IJsonModel<MultimodalDenseAndMultiVectorEmbedding>.Create(Utf8JsonReader, ModelReaderWriterOptions)
IJsonModel<MultimodalDenseAndMultiVectorEmbedding>.Write(Utf8JsonWriter, ModelReaderWriterOptions)
IPersistableModel<EmbeddingItem>.Create(BinaryData, ModelReaderWriterOptions) (Inherited from EmbeddingItem)
IPersistableModel<EmbeddingItem>.GetFormatFromOptions(ModelReaderWriterOptions) (Inherited from EmbeddingItem)
IPersistableModel<EmbeddingItem>.Write(ModelReaderWriterOptions) (Inherited from EmbeddingItem)
IPersistableModel<MultimodalDenseAndMultiVectorEmbedding>.Create(BinaryData, ModelReaderWriterOptions)
IPersistableModel<MultimodalDenseAndMultiVectorEmbedding>.GetFormatFromOptions(ModelReaderWriterOptions)
IPersistableModel<MultimodalDenseAndMultiVectorEmbedding>.Write(ModelReaderWriterOptions)

Applies to