Table of Contents

Class Message

Namespace
AnthropicClient.Models
Assembly
AnthropicClient.dll

Represents a message.

public class Message
Inheritance
Message
Inherited Members

Constructors

Message(string, List<Content>)

Initializes a new instance of the Message class.

public Message(string role, List<Content> content)

Parameters

role string

The role of the message.

content List<Content>

The contents of the message.

Exceptions

ArgumentException

Thrown when the role is invalid.

ArgumentNullException

Thrown when the role or content is null.

Properties

Content

Gets the contents of the message.

public List<Content> Content { get; init; }

Property Value

List<Content>

Role

Gets the role of the message.

public string Role { get; init; }

Property Value

string