MentorUserMessage record
The MentorUserMessage record of Novior.MentorAgent.Abstractions.Models: A user turn produced by the chat input: the typed text plus any images the user…
On this page
A user turn produced by the chat input: the typed text plus any images the user attached (roadmap #13 — multimodal input). Used as the payload of ChatInput.OnSend so text-only and multimodal turns travel through the same callback.
Definition
Section titled “Definition”Namespace: Novior.MentorAgent.Abstractions.Models. Package: Novior.MentorAgent.Abstractions.
public sealed record MentorUserMessage : IEquatable<MentorUserMessage>
dotnet add package Novior.MentorAgent.AbstractionsConstructors
Section titled “Constructors”public MentorUserMessage(string Text, IReadOnlyList<MentorAttachment>? Attachments = null)
A user turn produced by the chat input: the typed text plus any images the user attached (roadmap #13 — multimodal input). Used as the payload of ChatInput.OnSend so text-only and multimodal turns travel through the same callback.
Parameters
Text: The typed message. Never null; may be whitespace only when images are attached.Attachments: Attached images, ornullfor a text-only turn.
Properties
Section titled “Properties”Attachments
Section titled “Attachments”public IReadOnlyList<MentorAttachment>? Attachments { get; init; }
Attached images, or null for a text-only turn.
HasAttachments
Section titled “HasAttachments”public bool HasAttachments { get; }
True when at least one image is attached.
Language
Section titled “Language”public MentorLanguage? Language { get; init; }
The language of this turn: what the assistant answers in, and the language of the texts the server writes for it. null means MentorOptions.Language, read again on every turn. ChatWidget sets it from its Language parameter.
On the wire it is the name ("Italian") or the ISO code ("it"), in any case. Any other value — a number, a name that is not a MentorLanguage, an empty string — is read as null.
public string Text { get; init; }
The typed message. Never null; may be whitespace only when images are attached.
