add_inline_data: Add inline image data to Gemini API body

View source: R/utils.R

add_inline_dataR Documentation

Add inline image data to Gemini API body

Description

Appends an inline_data part (image) to the Gemini API request body.

Usage

add_inline_data(body, mime_type, data)

Arguments

body

A list representing the current Gemini API request body.

mime_type

Character. The MIME type of the image (e.g., "image/png").

data

Character. The base64-encoded image data.

Value

The updated body list with the inline image data added.


gemini.R documentation built on Sept. 1, 2025, 5:10 p.m.