assistantMessage

Creates an assistant message with the provided text and finish reason.

Return

A new instance of Message.Assistant containing the provided content, finish reason, and associated metadata.

Parameters

text

The content of the assistant message.

finishReason

The reason indicating why the message was concluded. Defaults to null.


Creates an assistant message with the provided text and finish reason.

Return

A new instance of Message.Assistant containing the provided content, finish reason, and associated metadata.

Parameters

tool

The tool used to generate the message content.

args

The arguments passed to the tool.

finishReason

The reason indicating why the message was concluded. Defaults to null.