Class FunctionResponsePart
A datatype containing media that is part of a FunctionResponse message. A
FunctionResponsePart consists of data which has an associated datatype. A
FunctionResponsePart can only contain one of the accepted types in
FunctionResponsePart.data. A FunctionResponsePart must have a fixed IANA MIME type
identifying the type and subtype of the media if the inline_data field is filled with raw
bytes.
public record FunctionResponsePart : IEquatable<FunctionResponsePart>
- Inheritance
-
FunctionResponsePart
- Implements
- Inherited Members
Properties
FileData
URI based data. This field is not supported in Gemini API.
[JsonPropertyName("fileData")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public FunctionResponseFileData? FileData { get; set; }
Property Value
InlineData
Inline media bytes.
[JsonPropertyName("inlineData")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public FunctionResponseBlob? InlineData { get; set; }
Property Value
Methods
FromJson(string, JsonSerializerOptions?)
Deserializes a JSON string to a FunctionResponsePart object.
public static FunctionResponsePart? FromJson(string jsonString, JsonSerializerOptions? options = null)
Parameters
jsonStringstringThe JSON string to deserialize.
optionsJsonSerializerOptionsOptional JsonSerializerOptions.
Returns
- FunctionResponsePart
The deserialized FunctionResponsePart object, or null if deserialization fails.