Vision (Image-to-Text)
Pass both text and image content to a multimodal model.Parameters
When using vision models withgenerateText, the following parameters are supported:
LanguageModel
required
The model instance to use for generation.
Message[]
required
Array of message objects representing the conversation history. For vision, pass
type: 'image' along with the image data (URL or Base64) and mimeType.number
Controls randomness (0.0 to 2.0).
number
The maximum number of tokens to generate.
number
Nucleus sampling probability.
number
Limits sampling to the top K probable tokens.
number
Encourages the model to talk about new topics.
number
Prevents the model from repeating words.
number
Attempts deterministic generation.
string[]
Custom sequences that stop the model from generating further text.
