Function: text()
@providerprotocol/ai / @providerprotocol/ai / text
Function: text()
Section titled “Function: text()”text(
content):TextBlock
Defined in: src/types/content.ts:435
Creates a text content block from a string.
Parameters
Section titled “Parameters”content
Section titled “content”string
The text content
Returns
Section titled “Returns”A TextBlock containing the provided text
Example
Section titled “Example”const block = text('Hello, world!');// { type: 'text', text: 'Hello, world!' }