Builds image and document content blocks for the Messages API.
Extra options are merged into the block unchanged, for example title:, context:,
citations: %{enabled: true} or cache_control: %{type: "ephemeral"}.
content = [
Jibu.Content.document("contract.pdf", title: "Contract"),
%{type: "text", text: "Summarize the termination clauses."}
]
Summary
Functions
Reads a PDF or plain text file into a document block.
Builds a document block from a binary. text/plain becomes a text source, anything else base64.
References a document uploaded through Jibu.Files.
Reads an image file into a base64 image block.
Builds a base64 image block from a binary.
References an image uploaded through Jibu.Files.
Functions
Reads a PDF or plain text file into a document block.
Builds a document block from a binary. text/plain becomes a text source, anything else base64.
References a document uploaded through Jibu.Files.
Reads an image file into a base64 image block.
Builds a base64 image block from a binary.
References an image uploaded through Jibu.Files.