Prompt Basics
File Attachments
File attachments allow you to attach files to your prompts.
Overview
File attachments enable you to include images and other files in your prompts. This is useful for tasks like image analysis, document processing, or any scenario where you need to work with external files.
Components
ImageAttachment
The <ImageAttachment>
component allows you to attach images to your prompt:
Parameters:
image
: URL to the image filemimeType
(optional): MIME type of the image (e.g., “image/jpeg”, “image/png”)
FileAttachment
The <FileAttachment>
component allows you to attach any type of file:
Parameters:
data
: URL to the filemimeType
: MIME type of the file (e.g., “application/pdf”, “text/plain”)
Example
Here’s a complete example showing how to use file attachments:
math.prompt.mdx
Have Questions?
We’re here to help! Choose the best way to reach us:
Join our Discord community for quick answers and discussions
Email us at hello@agentmark.co for support
Schedule an Enterprise Demo to learn about our business solutions