Message

data class Message(val role: String, val content: MessageCreateParams.Content)(source)

Message object for Claude API.

Constructors

Link copied to clipboard
constructor(role: String, content: MessageCreateParams.Content)

Properties

Link copied to clipboard

The content of the message. Can be a string for simple messages or a list of content blocks for multi-modal messages.

Link copied to clipboard

The role of the message's author. Currently, only "user" and "assistant" are supported.