Search Results for

    Show / Hide Table of Contents

    Class UserMessage

    Inheritance
    object
    ConversationItem
    Message
    UserMessage
    Implements
    IHasId<string>
    ILoadablePrompt
    IPrompt
    IValidatable
    IModeratable
    Inherited Members
    Message.Content
    Message.ThreadId
    Message.Name
    Message.CreatedAt
    Message.DisplayMessage
    Message.Create(ChatRole, MessageContent, ToolCall[], UnixTime?, string)
    Message.ToString()
    ConversationItem.Id
    ConversationItem.Type
    ConversationItem.Status
    ConversationItem.Validate()
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.ReferenceEquals(object, object)
    Namespace: Glitch9.AIDevKit
    Assembly: Glitch9.AIDevKit.dll
    Syntax
    public sealed class UserMessage : Message, IHasId<string>, ILoadablePrompt, IPrompt, IValidatable, IModeratable

    Constructors

    | Edit this page View Source

    UserMessage()

    Declaration
    public UserMessage()
    | Edit this page View Source

    UserMessage(MessageContent)

    Declaration
    public UserMessage(MessageContent content)
    Parameters
    Type Name Description
    MessageContent content
    | Edit this page View Source

    UserMessage(string)

    Declaration
    public UserMessage(string content)
    Parameters
    Type Name Description
    string content

    Properties

    | Edit this page View Source

    Role

    The role of the messages author.

    Role is abstract and overridden in derived classes to enforce consistency.
    This avoids relying on constructor or deserialization logic to set the role.
    JSON.NET does not call parameterized constructors or set get-only properties during deserialization.

    Declaration
    public override ChatRole Role { get; }
    Property Value
    Type Description
    ChatRole
    Overrides
    Message.Role

    Methods

    | Edit this page View Source

    ArePromptFilesRequireLoading()

    Declaration
    public bool ArePromptFilesRequireLoading()
    Returns
    Type Description
    bool
    | Edit this page View Source

    GetPromptFiles()

    Declaration
    public IFile[] GetPromptFiles()
    Returns
    Type Description
    IFile[]
    | Edit this page View Source

    GetPromptText()

    Declaration
    public override string GetPromptText()
    Returns
    Type Description
    string
    Overrides
    ConversationItem.GetPromptText()
    | Edit this page View Source

    IsValid()

    Declaration
    public override bool IsValid()
    Returns
    Type Description
    bool
    Overrides
    ConversationItem.IsValid()
    | Edit this page View Source

    LoadPromptFilesAsync()

    Declaration
    public UniTask LoadPromptFilesAsync()
    Returns
    Type Description
    UniTask
    | Edit this page View Source

    ToModerationPrompt()

    Declaration
    public ModerationPrompt ToModerationPrompt()
    Returns
    Type Description
    ModerationPrompt

    Operators

    | Edit this page View Source

    implicit operator string(UserMessage)

    Declaration
    public static implicit operator string(UserMessage message)
    Parameters
    Type Name Description
    UserMessage message
    Returns
    Type Description
    string

    Implements

    IHasId<TId>
    ILoadablePrompt
    IPrompt
    IValidatable
    IModeratable

    Extension Methods

    UnifiedApiCallerExtensions.GENResponse(ConversationItem)
    UnifiedApiCallerExtensions.GENModeration(IModeratable, IEnumerable<SafetySetting>)
    CollectionExtensions.Add(Message, Object)
    CollectionExtensions.AddAttachment(Message, IFile)
    CollectionExtensions.AddAttachments(Message, IEnumerable<IFile>)
    CollectionExtensions.AddRange(Message, IEnumerable<Object>)
    ThreadMessageExtensions.ToThreadMessageRequest(Message)
    UnifiedApiCallerExtensions.CountTokens(Message)
    UnifiedApiCallerExtensions.GENCompletion(Message)
    OutputExtensions.GetInputUnityObjects<T>(UserMessage)
    ArrayExtensions.ToArrayOrEmpty<T>(T)
    ArrayExtensions.ToArrayOrNull<T>(T)
    EventExtensions.ToDelta<T>(T, string, int, string, bool)
    EventExtensions.ToDone<T>(T, string, int, string)
    EventExtensions.ToEvent<T>(T)
    EventExtensions.UpcastDelta<T1, T2>(T1, string, int, string, bool)
    FallbackExtensions.IsOr<TParent, TChild>(TParent, TChild)
    ResponseCastingExtensions.GetResult<T>(T)
    CoreLibTypeExtensions.GetIdOrNull(IHasId<string>)
    CoreLibTypeExtensions.IsNullOrEmptyId(IHasId<string>)
    SystemExtensions.GetName(object)
    • Edit this page
    • View Source
    In this article
    Back to top AI DevKit Documentation