Table of Contents

Class ResponseMessage

Namespace
Glitch9.AIDevKit
public class ResponseMessage : Message, IPromptWithFiles, IPrompt, IModeratable
Inheritance
object
ResponseMessage
Implements
Inherited Members
Extension Methods

Constructors

ResponseMessage()

public ResponseMessage()

ResponseMessage(MessageContent, ToolCall[], UsageMetadata)

public ResponseMessage(MessageContent content, ToolCall[] tools = null, UsageMetadata usage = null)

Parameters

content MessageContent
tools ToolCall[]
usage UsageMetadata

ResponseMessage(MessageContent, UsageMetadata)

public ResponseMessage(MessageContent content, UsageMetadata usage)

Parameters

content MessageContent
usage UsageMetadata

Properties

Annotations

Annotations associated with the response message.
See: https://platform.openai.com/docs/assistants/deep-dive#message-annotations

*Note: In Responses API, annotations are sent as a separate 'ConversationItem' instead of being part of the Message.

public AnnotationWrapper[] Annotations { get; set; }

Property Value

AnnotationWrapper[]

AudioOutput

The voice (speech) output generated by the model. It is only populated if the model was requested to generate audio via ChatCompletions API. This is not supported in the Responses API yet, but will be in the future.

public GeneratedAudio AudioOutput { get; set; }

Property Value

GeneratedAudio

GeneratedAudio

The generated voice (speech) audio clip from the model.

public AudioClip GeneratedAudio { get; set; }

Property Value

AudioClip

GeneratedImage

The generated image from the model.

public Texture2D GeneratedImage { get; set; }

Property Value

Texture2D

Reasoning

Claude/xAI: Reasoning (called "thinking" in Claude) text for the response.

public string Reasoning { get; set; }

Property Value

string

Refusal

Claude-specific refusal text for the response.

For Responses API, this is sent as a separate 'ConversationItem' instead of being part of the Message.

public string Refusal { get; set; }

Property Value

string

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

Claude-specific signature for the response.

public string Signature { get; set; }

Property Value

string

ToolCalls

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

*Note: In ResponsesAPI, tool calls are sent as a separate 'ConversationItem' instead of being part of the Message.

public ToolCall[] ToolCalls { get; set; }

Property Value

ToolCall[]

Usage

The usage statistics for the response message.

public UsageMetadata Usage { get; set; }

Property Value

UsageMetadata

Methods

ErrorMessage(string)

public static ResponseMessage ErrorMessage(string errorMessage)

Parameters

errorMessage string

Returns

ResponseMessage

FlaggedMessage(ModerationResult)

public static ResponseMessage FlaggedMessage(ModerationResult moderation)

Parameters

moderation ModerationResult

Returns

ResponseMessage

ImageMessage(Texture2D)

public static ResponseMessage ImageMessage(Texture2D image)

Parameters

image Texture2D

Returns

ResponseMessage

ToReasoning()

public string ToReasoning()

Returns

string

ToRefusal()

public string ToRefusal()

Returns

string

Operators

implicit operator string(ResponseMessage)

public static implicit operator string(ResponseMessage message)

Parameters

message ResponseMessage

Returns

string