Skip to contents

Encode images in messages to base64 format

Usage

encode_images_in_messages(messages)

Arguments

messages

A list of messages, each of list class. Generally used in the chat() function.

Value

A list of messages with images encoded in base64 format.

Examples

image <- file.path(system.file("extdata", package = "ollamar"), "image1.png")
message <- create_message(content = "what is in the image?", images = image)
message_updated <- encode_images_in_messages(message)