Table of Contents

Class SingleEmbedContentResponse

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

Config for response parameter.

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

Properties

Embedding

The response to the request.

[JsonPropertyName("embedding")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public ContentEmbedding? Embedding { get; set; }

Property Value

ContentEmbedding

TokenCount

The error encountered while processing the request.

[JsonPropertyName("tokenCount")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonConverter(typeof(StringToNullableLongConverter))]
public long? TokenCount { get; set; }

Property Value

long?

Methods

FromJson(string, JsonSerializerOptions?)

Deserializes a JSON string to a SingleEmbedContentResponse object.

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

Parameters

jsonString string

The JSON string to deserialize.

options JsonSerializerOptions

Optional JsonSerializerOptions.

Returns

SingleEmbedContentResponse

The deserialized SingleEmbedContentResponse object, or null if deserialization fails.