Class ResponseMessage
Inheritance
ResponseMessage
Assembly: Glitch9.AIDevKit.dll
Syntax
public class ResponseMessage : Message, IPrompt, IValidatable, IHasId<string>
Constructors
|
Edit this page
View Source
ResponseMessage()
Declaration
|
Edit this page
View Source
ResponseMessage(MessageContent, ToolCall[], Usage)
Declaration
public ResponseMessage(MessageContent content, ToolCall[] toolCalls = null, Usage usage = null)
Parameters
|
Edit this page
View Source
ResponseMessage(MessageContent, Usage)
Declaration
public ResponseMessage(MessageContent content, Usage usage)
Parameters
Properties
|
Edit this page
View Source
Annotations
Declaration
public AnnotationEnvelope[] Annotations { get; set; }
Property Value
|
Edit this page
View Source
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.
Declaration
public ChatCompletionAudioData AudioOutput { get; set; }
Property Value
|
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
Overrides
|
Edit this page
View Source
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.
Declaration
public ToolCall[] ToolCalls { get; set; }
Property Value
|
Edit this page
View Source
Usage
Declaration
public Usage Usage { get; set; }
Property Value
Methods
|
Edit this page
View Source
FromOutputText(string, params Annotation[])
Declaration
public static ResponseMessage FromOutputText(string outputText, params Annotation[] annotations)
Parameters
Returns
|
Edit this page
View Source
FromRefusal(string)
Declaration
public static ResponseMessage FromRefusal(string refusalText)
Parameters
| Type |
Name |
Description |
| string |
refusalText |
|
Returns
Operators
|
Edit this page
View Source
implicit operator string(ResponseMessage)
Declaration
public static implicit operator string(ResponseMessage message)
Parameters
Returns
Implements
Extension Methods