gemini_image: Generate text from text and image with Gemini
Description
Generate text from text and image with Gemini
Usage
gemini_image(
image = NULL,
prompt = "Explain this image",
model = "1.5-flash",
temperature = 0.5,
maxOutputTokens = 1024,
type = "png"
)
Value
Generated text
Arguments
image
The image to generate text
prompt
The prompt to generate text, Default is "Explain this image"
model
The model to use. Options are '1.5-flash', '1.5-pro' and '2.0-flash-exp'. Default is '1.5-flash'
see https://ai.google.dev/gemini-api/docs/models/gemini
temperature
The temperature to use. Default is 0.5 value should be between 0 and 2
see https://ai.google.dev/gemini-api/docs/models/generative-models#model-parameters
maxOutputTokens
The maximum number of tokens to generate.
Default is 1024 and 100 tokens correspond to roughly 60-80 words.
type
The type of image. Options are 'png', 'jpeg', 'webp', 'heic', 'heif'. Default is 'png'