ReadonlytypeDiscriminator for message type.
ReadonlyroleThe role of the message sender.
ReadonlycontentArray of content blocks that make up this message.
StaticfromSerializes the Message to a JSON-compatible MessageData object. Called automatically by JSON.stringify().
StaticfromCreates a Message instance from MessageData. Alias for fromMessageData for API consistency.
MessageData to deserialize
Message instance
A message in a conversation between user and assistant. Each message has a role (user or assistant) and an array of content blocks.