Class EmbedContentBatch
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
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
Methods
FromJson(string, JsonSerializerOptions?)
Deserializes a JSON string to a EmbedContentBatch object.
public static EmbedContentBatch? FromJson(string jsonString, JsonSerializerOptions? options = null)
Parameters
jsonStringstringThe JSON string to deserialize.
optionsJsonSerializerOptionsOptional JsonSerializerOptions.
Returns
- EmbedContentBatch
The deserialized EmbedContentBatch object, or null if deserialization fails.