A block of content within a message.
Content blocks can contain text, tool usage requests, tool results, reasoning content, cache points, guard content, or media (image, video, document).
This is a discriminated union where the object key determines the content format.
Example
if ('text'inblock) { console.log(block.text.text) }
A block of content within a message. Content blocks can contain text, tool usage requests, tool results, reasoning content, cache points, guard content, or media (image, video, document).
This is a discriminated union where the object key determines the content format.