class LLMContentBlock extends AbstractObject implements IdAble, Node

A single piece of content within an LLM message.

Properties

$lastQuery from  AbstractObject

Methods

__construct(AbstractClient $client, QueryBuilderChain $queryBuilderChain)

No description

null|array|string|int|float|bool
queryLeaf(QueryBuilder $leafQueryBuilder, string $leafKey)

No description

arguments()

The arguments passed to the tool, JSON-encoded (for TOOL_CALL kind).

string
callId()

The unique ID of a tool call (for TOOL_CALL or TOOL_RESULT kinds).

bool
errored()

Whether the tool call resulted in an error (for TOOL_RESULT kind).

Id
id()

A unique identifier for this LLMContentBlock.

LLMContentBlockKind
kind()

The kind of content block, which determines the other populated fields.

string
signature()

Provider-specific opaque data (e.g. Anthropic thinking signature). Preserve it when reconstructing a conversation.

string
text()

Text content (for TEXT, THINKING, or TOOL_RESULT kinds).

string
toolName()

The name of the tool called (for TOOL_CALL kind).

Details

in AbstractObject at line 13
__construct(AbstractClient $client, QueryBuilderChain $queryBuilderChain)

No description

Parameters

AbstractClient $client
QueryBuilderChain $queryBuilderChain

in AbstractObject at line 19
protected null|array|string|int|float|bool queryLeaf(QueryBuilder $leafQueryBuilder, string $leafKey)

No description

Parameters

QueryBuilder $leafQueryBuilder
string $leafKey

Return Value

null|array|string|int|float|bool

at line 19
Json arguments()

The arguments passed to the tool, JSON-encoded (for TOOL_CALL kind).

Return Value

Json

at line 28
string callId()

The unique ID of a tool call (for TOOL_CALL or TOOL_RESULT kinds).

Return Value

string

at line 37
bool errored()

Whether the tool call resulted in an error (for TOOL_RESULT kind).

Return Value

bool

at line 46
Id id()

A unique identifier for this LLMContentBlock.

Return Value

Id

at line 55
LLMContentBlockKind kind()

The kind of content block, which determines the other populated fields.

Return Value

LLMContentBlockKind

at line 64
string signature()

Provider-specific opaque data (e.g. Anthropic thinking signature). Preserve it when reconstructing a conversation.

Return Value

string

at line 73
string text()

Text content (for TEXT, THINKING, or TOOL_RESULT kinds).

Return Value

string

at line 82
string toolName()

The name of the tool called (for TOOL_CALL kind).

Return Value

string