File data that doesn't fit into other multimodal block types.
This block is intended for files that are not images, audio, or plaintext. For example, it can be used for PDFs, Word documents, etc.
If the file is an image, audio, or plaintext, you should use the corresponding
content block type (e.g., ImageContentBlock, AudioContentBlock,
PlainTextContentBlock).
create_file_block may also be used as a factory to create a
FileContentBlock. Benefits include:
FileContentBlock()Type of the content block. Used for discrimination.
Unique identifier for this content block.
Used for tracking and referencing specific blocks (e.g., during streaming).
Not to be confused with file_id, which references an external file in a
storage system.
Either:
UUID4 prefixed with 'lc_'))Reference to the file in an external file storage system.
For example, a file ID from OpenAI's Files API or another cloud storage provider.
This is distinct from id, which identifies the content block itself.
Index of block in aggregate response. Used during streaming.
URL of the file.
Data as a base64 string.
Provider-specific metadata. This shouldn't be used for the file data itself.