Table of Contents

Class EmbedContentResponse

Namespace
Google.GenAI.Types
Assembly
Google.GenAI.dll

Response for the embed_content method.

public record EmbedContentResponse : IEquatable<EmbedContentResponse>
Inheritance
EmbedContentResponse
Implements
Inherited Members

Properties

Embeddings

The embeddings for each request, in the same order as provided in the batch request.

[JsonPropertyName("embeddings")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public List<ContentEmbedding>? Embeddings { get; set; }

Property Value

List<ContentEmbedding>

Metadata

Gemini Enterprise Agent Platform only. Metadata about the request.

[JsonPropertyName("metadata")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public EmbedContentMetadata? Metadata { get; set; }

Property Value

EmbedContentMetadata

SdkHttpResponse

Used to retain the full HTTP response.

[JsonPropertyName("sdkHttpResponse")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public HttpResponse? SdkHttpResponse { get; set; }

Property Value

HttpResponse

Methods

FromJson(string, JsonSerializerOptions?)

Deserializes a JSON string to a EmbedContentResponse object.

public static EmbedContentResponse? FromJson(string jsonString, JsonSerializerOptions? options = null)

Parameters

jsonString string

The JSON string to deserialize.

options JsonSerializerOptions

Optional JsonSerializerOptions.

Returns

EmbedContentResponse

The deserialized EmbedContentResponse object, or null if deserialization fails.