Table of Contents

Class AssistantMessage

Namespace
Glitch9.AIDevKit
public class AssistantMessage : ChatMessage
Inheritance
object
AssistantMessage
Derived
Inherited Members
Extension Methods

Constructors

AssistantMessage()

public AssistantMessage()

AssistantMessage(ChatContent, ToolCall[], Usage)

public AssistantMessage(ChatContent content, ToolCall[] tools = null, Usage usage = null)

Parameters

content ChatContent
tools ToolCall[]
usage Usage

AssistantMessage(GeneratedImage)

public AssistantMessage(GeneratedImage image)

Parameters

image GeneratedImage

AssistantMessage(Texture2D)

public AssistantMessage(Texture2D texture)

Parameters

texture Texture2D

Properties

Annotations

public List<Annotation> Annotations { get; set; }

Property Value

List<Annotation>

Audio

public SpeechOutputData Audio { get; set; }

Property Value

SpeechOutputData

GeneratedImage

The generated image from the model.

public GeneratedImage GeneratedImage { get; set; }

Property Value

GeneratedImage

GeneratedTexture

public Texture2D GeneratedTexture { get; set; }

Property Value

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.

public override ChatRole Role { get; }

Property Value

ChatRole

Signature

public string Signature { get; set; }

Property Value

string

Thinking

public string Thinking { get; set; }

Property Value

string

Tools

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

public ToolCall[] Tools { get; set; }

Property Value

ToolCall[]

Usage

The usage statistics for the response message.

public Usage Usage { get; set; }

Property Value

Usage

Methods

GetSpeechAsync(AudioFormat, MIMEType)

public UniTask<AudioClip> GetSpeechAsync(AudioFormat format, MIMEType mimeType)

Parameters

format AudioFormat
mimeType MIMEType

Returns

UniTask<AudioClip>

Operators

implicit operator string(AssistantMessage)

public static implicit operator string(AssistantMessage message)

Parameters

message AssistantMessage

Returns

string