class LLMMessage extends AbstractObject implements IdAble, Node

A single message in an LLM conversation.

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

array
content()

The message's content blocks, in the order the model produced them.

Id
id()

A unique identifier for this LLMMessage.

LLMMessageRole
role()

The role that produced this message.

tokenUsage()

Token usage reported by the provider for the API call that produced this message; all zeros except on assistant responses.

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
array content()

The message's content blocks, in the order the model produced them.

Return Value

array

at line 28
Id id()

A unique identifier for this LLMMessage.

Return Value

Id

at line 37
LLMMessageRole role()

The role that produced this message.

Return Value

LLMMessageRole

at line 46
LLMTokenUsage tokenUsage()

Token usage reported by the provider for the API call that produced this message; all zeros except on assistant responses.

Return Value

LLMTokenUsage