Table of Contents

Class Message

Namespace
Emissary
Assembly
Emissary.dll

One immutable message in a conversation.

public sealed record Message : IEquatable<Message>
Inheritance
Message
Implements
Inherited Members

Constructors

Message(MessageRole, ImmutableArray<ContentBlock>)

One immutable message in a conversation.

public Message(MessageRole Role, ImmutableArray<ContentBlock> Content)

Parameters

Role MessageRole

Who authored the message.

Content ImmutableArray<ContentBlock>

The content blocks, in order.

Properties

Content

The content blocks, in order.

public ImmutableArray<ContentBlock> Content { get; init; }

Property Value

ImmutableArray<ContentBlock>

Role

Who authored the message.

public MessageRole Role { get; init; }

Property Value

MessageRole

Text

The concatenated text of all TextBlocks in this message.

[JsonIgnore]
public string Text { get; }

Property Value

string

Methods

User(string)

Creates a user message with a single text block.

public static Message User(string text)

Parameters

text string

The user's text.

Returns

Message