Class EmbedContentResponse
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
Metadata
Gemini Enterprise Agent Platform only. Metadata about the request.
[JsonPropertyName("metadata")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public EmbedContentMetadata? Metadata { get; set; }
Property Value
SdkHttpResponse
Used to retain the full HTTP response.
[JsonPropertyName("sdkHttpResponse")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public HttpResponse? SdkHttpResponse { get; set; }
Property Value
Methods
FromJson(string, JsonSerializerOptions?)
Deserializes a JSON string to a EmbedContentResponse object.
public static EmbedContentResponse? FromJson(string jsonString, JsonSerializerOptions? options = null)
Parameters
jsonStringstringThe JSON string to deserialize.
optionsJsonSerializerOptionsOptional JsonSerializerOptions.
Returns
- EmbedContentResponse
The deserialized EmbedContentResponse object, or null if deserialization fails.