AttachmentBuilder
A builder for constructing attachments for prompt messages.
Example usage:
val attachments = AttachmentBuilder().apply {
image("screenshot.png")
binaryFile("report.pdf")
}.build()
See also
Functions
Adds Attachment to the list of attachments.
Adds Attachment.Audio to the list of attachments.
Adds Attachment.Audio with AttachmentContent.URL content from the provided URL.
Adds Attachment.Audio with AttachmentContent.Binary.Bytes content from the provided local file path.
Adds Attachment.File with AttachmentContent.Binary.Bytes content from the provided local file path.
Constructs and returns the accumulated list of attachment items.
Adds Attachment.File to the list of attachments.
Adds Attachment.File with AttachmentContent.URL content from the provided URL.
Adds Attachment.Image to the list of attachments.
Adds Attachment.Image with AttachmentContent.URL content from the provided URL.
Adds Attachment.Image with AttachmentContent.Binary.Bytes content from the provided local file path.
Adds Attachment.File with AttachmentContent.PlainText content from the provided local file path.
Adds Attachment.Video to the list of attachments.
Adds Attachment.Video with AttachmentContent.URL content from the provided URL.
Adds Attachment.Video with AttachmentContent.Binary.Bytes content from the provided local file path.