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
RoleMessageRoleWho authored the message.
ContentImmutableArray<ContentBlock>The content blocks, in order.
Properties
Content
The content blocks, in order.
public ImmutableArray<ContentBlock> Content { get; init; }
Property Value
Role
Who authored the message.
public MessageRole Role { get; init; }
Property Value
Text
The concatenated text of all TextBlocks in this message.
[JsonIgnore]
public string Text { get; }
Property Value
Methods
User(string)
Creates a user message with a single text block.
public static Message User(string text)
Parameters
textstringThe user's text.