Skip to main content
A prompt method can return images along with text. This guide writes a recipe for each photo of ingredients.
1

Create a dataset with image links

2

Return the text and the image from prompt

Return a tuple with the text and a curator.types.Image.
3

Run it with a model that accepts images

Image sources

You can create a curator.types.Image in two ways. Set exactly one of url or content.
  • url is a web link or a path to a local file. Curator reads a local file and sends it as base64.
  • content is the image as bytes, as a PIL image, or as a base64 string.
The multimodal examples on GitHub show more cases.