ai.content.blocks

Content blocks from ordinary values: a bare `string` becomes `Text`, a bare `image` / `audio` / `video` / `pdf` becomes `Media` with null provenance, and a block already built passes through. The one constructor behind `root.events.UserMessage.of` and `root.events.ToolCompleted.of`.

Reference version

Signature

function ai.content.blocks(
items: (string | image | audio | video | pdf | ai.content.Text | ai.content.Media)[]

Content blocks from ordinary values: a bare string becomes Text, a bare image / audio / video / pdf becomes Media with null provenance, and a block already built passes through. The one constructor behind root.events.UserMessage.of and root.events.ToolCompleted.of.

Source:<builtin>/ai/ns_content/content.bamlbytes 28713426