Open Agent Loops
API Reference

FilePart

@open-agent-loops/core


Defined in: types/content-part.ts:90

A file content part (e.g. a PDF): either inline base64 data, or a reference to a file already uploaded to the provider.

Remarks

Supply file_data (+ usually filename) for an inline document, OR file_id to point at a previously-uploaded file — not both. The wire shape leaves all three optional; which combination a given endpoint accepts is the provider's concern.

Properties

PropertyTypeDescriptionDefined in
file{ file_data?: string; file_id?: string; filename?: string; }The inline file payload or an uploaded-file reference.types/content-part.ts:94
file.file_data?stringInline file contents, base64-encoded (often a data: URI).types/content-part.ts:96
file.file_id?stringId of a file previously uploaded to the provider.types/content-part.ts:100
file.filename?stringDisplay name for the file, e.g. "report.pdf".types/content-part.ts:98
type"file"Discriminant.types/content-part.ts:92

On this page