Sycophant. Message. Content. Document
(sycophant v0.5.0)
Copy Markdown
Document content part for multimodal messages (PDF, CSV, plain text, ...).
Provide exactly one source: :data (base64-encoded bytes), :url (remote
document), or :file_id (a provider-uploaded file reference obtained out of
band). Set :media_type to the MIME type (e.g. "application/pdf",
"text/csv"). :name carries the title/filename. Set :citations to
true to request document citations (Anthropic only; other wires ignore it).
Examples
# Base64-encoded PDF
%Sycophant.Message.Content.Document{
data: "JVBERi0xLjQK...",
media_type: "application/pdf",
name: "report.pdf"
}
# Remote PDF with citations requested
%Sycophant.Message.Content.Document{
url: "https://example.com/report.pdf",
media_type: "application/pdf",
citations: true
}