Table of Contents

Class FunctionResponseBlob

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

Raw media bytes for function response. Text should not be sent as raw bytes, use the 'text' field.

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

Properties

Data

Raw bytes.

[JsonPropertyName("data")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public byte[]? Data { get; set; }

Property Value

byte[]

DisplayName

Optional. Display name of the blob. Used to provide a label or filename to distinguish blobs. This field is only returned in PromptMessage for prompt management. It is currently used in the Gemini GenerateContent calls only when server side tools (code_execution, google_search, and url_context) are enabled. This field is not supported in Gemini API.

[JsonPropertyName("displayName")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string? DisplayName { get; set; }

Property Value

string

MimeType

The IANA standard MIME type of the source data.

[JsonPropertyName("mimeType")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string? MimeType { get; set; }

Property Value

string

Methods

FromJson(string, JsonSerializerOptions?)

Deserializes a JSON string to a FunctionResponseBlob object.

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

Parameters

jsonString string

The JSON string to deserialize.

options JsonSerializerOptions

Optional JsonSerializerOptions.

Returns

FunctionResponseBlob

The deserialized FunctionResponseBlob object, or null if deserialization fails.