AI Dev Kit
Search Results for

    Show / Hide Table of Contents

    Class ChatMessage

    Inheritance
    object
    ChatMessage
    AssistantMessage
    ThreadMessage
    SystemMessage
    UserMessage
    Namespace: Glitch9.AIDevKit
    Assembly: .dll
    Syntax
    public abstract class ChatMessage

    Constructors

    ChatMessage()

    Declaration
    public ChatMessage()

    ChatMessage(string)

    Declaration
    public ChatMessage(string content = null)
    Parameters
    Type Name Description
    string content

    Properties

    Content

    The contents of the user message.

    Declaration
    public Content Content { get; set; }
    Property Value
    Type Description
    Content

    Name

    Optional. An optional name for the participant. Provides the model information to differentiate between participants of the same role.

    Declaration
    public string Name { get; set; }
    Property Value
    Type Description
    string

    Role

    The role of the messages author.

    Declaration
    public abstract ChatRole Role { get; }
    Property Value
    Type Description
    ChatRole

    SentAt

    Declaration
    public UnixTime SentAt { get; }
    Property Value
    Type Description
    UnixTime

    Methods

    Create(ChatRole, string)

    Declaration
    public static ChatMessage Create(ChatRole role, string content = null)
    Parameters
    Type Name Description
    ChatRole role
    string content
    Returns
    Type Description
    ChatMessage

    ToString()

    Returns a string that represents the current object.

    Declaration
    public override string ToString()
    Returns
    Type Description
    string

    A string that represents the current object.

    Overrides
    object.ToString()

    Operators

    implicit operator string(ChatMessage)

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

    Extension Methods

    ThreadMessageExtensions.ToThreadMessageRequest(ChatMessage)
    In this article
    Back to top Generated by DocFX