Table of Contents

Class EmbedContentBatch

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

Parameters for the embed_content method.

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

Properties

Config

Configuration that contains optional parameters.

[JsonPropertyName("config")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public EmbedContentConfig? Config { get; set; }

Property Value

EmbedContentConfig

Contents

The content to embed. Only the parts.text fields will be counted.

[JsonPropertyName("contents")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public List<Content>? Contents { get; set; }

Property Value

List<Content>

Methods

FromJson(string, JsonSerializerOptions?)

Deserializes a JSON string to a EmbedContentBatch object.

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

Parameters

jsonString string

The JSON string to deserialize.

options JsonSerializerOptions

Optional JsonSerializerOptions.

Returns

EmbedContentBatch

The deserialized EmbedContentBatch object, or null if deserialization fails.