AI DevKit
Search Results for

    Show / Hide Table of Contents

    Class AssistantMessage

    Inheritance
    object
    ChatMessage
    AssistantMessage
    ToolMessage
    Inherited Members
    ChatMessage.Content
    ChatMessage.Name
    ChatMessage.Timestamp
    ChatMessage.Create(ChatRole, ChatContent)
    ChatMessage.ToString()
    Namespace: Glitch9.AIDevKit
    Assembly: .dll
    Syntax
    public class AssistantMessage : ChatMessage

    Constructors

    AssistantMessage()

    Declaration
    public AssistantMessage()

    AssistantMessage(ChatContent, ToolCall[], Usage)

    Declaration
    public AssistantMessage(ChatContent content, ToolCall[] tools = null, Usage usage = null)
    Parameters
    Type Name Description
    ChatContent content
    ToolCall[] tools
    Usage usage

    AssistantMessage(GeneratedImage)

    Declaration
    public AssistantMessage(GeneratedImage image)
    Parameters
    Type Name Description
    GeneratedImage image

    AssistantMessage(Texture2D)

    Declaration
    public AssistantMessage(Texture2D texture)
    Parameters
    Type Name Description
    Texture2D texture

    Properties

    Annotations

    Declaration
    public List<Annotation> Annotations { get; set; }
    Property Value
    Type Description
    List<Annotation>

    Audio

    Declaration
    public SpeechOutputData Audio { get; set; }
    Property Value
    Type Description
    SpeechOutputData

    GeneratedImage

    The generated image from the model.

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

    GeneratedTexture

    Declaration
    public Texture2D GeneratedTexture { get; set; }
    Property Value
    Type Description
    Texture2D

    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
    ChatMessage.Role

    Signature

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

    Thinking

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

    Tools

    Optional. A list of tool calls (functions) the model wants to use.

    Declaration
    public ToolCall[] Tools { get; set; }
    Property Value
    Type Description
    ToolCall[]

    Usage

    The usage statistics for the response message.

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

    Methods

    GetSpeechAsync(AudioFormat, MIMEType)

    Declaration
    public UniTask<AudioClip> GetSpeechAsync(AudioFormat format, MIMEType mimeType)
    Parameters
    Type Name Description
    AudioFormat format
    MIMEType mimeType
    Returns
    Type Description
    UniTask<AudioClip>

    Operators

    implicit operator string(AssistantMessage)

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

    Extension Methods

    ConverterExtensions.ToAnthropicMessage(ChatMessage)
    ChatMessageExtensions.IsNullOrEmpty(ChatMessage)
    ThreadMessageExtensions.ToThreadMessageRequest(ChatMessage)
    In this article
    Back to top Generated by DocFX