addMessage

Adds a message to the conversation.

Return

This builder instance for method chaining.

Parameters

role

The role of the message sender.

content

The content of the message.


Adds a message with structured content parts to the conversation.

Return

This builder instance for method chaining.

Parameters

role

The role of the message sender.

content

The structured message content.