pub fn image_block_from_file(path: &Path) -> Result<ContentBlock, String>Expand description
Helper to create an image content block from a file path.
Reads the file, base64-encodes it, and infers the media type from the file extension.
pub fn image_block_from_file(path: &Path) -> Result<ContentBlock, String>Helper to create an image content block from a file path.
Reads the file, base64-encodes it, and infers the media type from the file extension.