Skip to content

Function: text()

@providerprotocol/ai


@providerprotocol/ai / @providerprotocol/ai / text

text(content): TextBlock

Defined in: src/types/content.ts:435

Creates a text content block from a string.

string

The text content

TextBlock

A TextBlock containing the provided text

const block = text('Hello, world!');
// { type: 'text', text: 'Hello, world!' }