MentorAgent Docs
Menu

ReferencePackage: Novior.MentorAgent.Abstractions

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…

View as Markdown
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.

Namespace: Novior.MentorAgent.Abstractions.Models. Package: Novior.MentorAgent.Abstractions.

public sealed record MentorUserMessage : IEquatable<MentorUserMessage>

Terminal
dotnet add package Novior.MentorAgent.Abstractions

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, or null for a text-only turn.

public IReadOnlyList<MentorAttachment>? Attachments { get; init; }

Attached images, or null for a text-only turn.

public bool HasAttachments { get; }

True when at least one image is attached.

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.