Search Results for

    Show / Hide Table of Contents

    Class ResponseMessage

    Inheritance
    object
    ConversationItem
    Message
    ResponseMessage
    CohereMessage
    Implements
    IPrompt
    IValidatable
    IHasId<string>
    Inherited Members
    Message.Content
    Message.ThreadId
    Message.Name
    Message.CreatedAt
    Message.DisplayMessage
    Message.Create(ChatRole, MessageContent, ToolCall[], UnixTime?, string)
    Message.ToString()
    ConversationItem.Id
    ConversationItem.Type
    ConversationItem.Status
    ConversationItem.GetPromptText()
    ConversationItem.IsValid()
    ConversationItem.Validate()
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    Namespace: Glitch9.AIDevKit
    Assembly: Glitch9.AIDevKit.dll
    Syntax
    public class ResponseMessage : Message, IPrompt, IValidatable, IHasId<string>

    Constructors

    | Edit this page View Source

    ResponseMessage()

    Declaration
    public ResponseMessage()
    | Edit this page View Source

    ResponseMessage(MessageContent, ToolCall[], Usage)

    Declaration
    public ResponseMessage(MessageContent content, ToolCall[] toolCalls = null, Usage usage = null)
    Parameters
    Type Name Description
    MessageContent content
    ToolCall[] toolCalls
    Usage usage
    | Edit this page View Source

    ResponseMessage(MessageContent, Usage)

    Declaration
    public ResponseMessage(MessageContent content, Usage usage)
    Parameters
    Type Name Description
    MessageContent content
    Usage usage

    Properties

    | Edit this page View Source

    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.

    Declaration
    public AnnotationEnvelope[] Annotations { get; set; }
    Property Value
    Type Description
    AnnotationEnvelope[]
    | 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
    Type Description
    ChatCompletionAudioData
    | 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
    Type Description
    ChatRole
    Overrides
    Message.Role
    | Edit this page View Source

    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.

    Declaration
    public ToolCall[] ToolCalls { get; set; }
    Property Value
    Type Description
    ToolCall[]
    | Edit this page View Source

    Usage

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

    Methods

    | Edit this page View Source

    FromOutputText(string, params Annotation[])

    Declaration
    public static ResponseMessage FromOutputText(string outputText, params Annotation[] annotations)
    Parameters
    Type Name Description
    string outputText
    Annotation[] annotations
    Returns
    Type Description
    ResponseMessage
    | Edit this page View Source

    FromRefusal(string)

    Declaration
    public static ResponseMessage FromRefusal(string refusalText)
    Parameters
    Type Name Description
    string refusalText
    Returns
    Type Description
    ResponseMessage

    Operators

    | Edit this page View Source

    implicit operator string(ResponseMessage)

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

    Implements

    IPrompt
    IValidatable
    IHasId<TId>

    Extension Methods

    UnifiedApiCallerExtensions.GENResponse(ConversationItem)
    CollectionExtensions.Add(Message, Object)
    CollectionExtensions.AddAttachment(Message, IFile)
    CollectionExtensions.AddAttachments(Message, IEnumerable<IFile>)
    CollectionExtensions.AddRange(Message, IEnumerable<Object>)
    ThreadMessageExtensions.ToThreadMessageRequest(Message)
    UnifiedApiCallerExtensions.CountTokens(Message)
    UnifiedApiCallerExtensions.GENCompletion(Message)
    ArrayExtensions.ToArrayOrEmpty<T>(T)
    ArrayExtensions.ToArrayOrNull<T>(T)
    EventExtensions.ToDelta<T>(T, string, int, string, bool)
    EventExtensions.ToDone<T>(T, string, int, string)
    EventExtensions.ToEvent<T>(T)
    EventExtensions.UpcastDelta<T1, T2>(T1, string, int, string, bool)
    FallbackExtensions.IsOr<TParent, TChild>(TParent, TChild)
    ResponseCastingExtensions.GetResult<T>(T)
    CoreLibTypeExtensions.GetIdOrNull(IHasId<string>)
    CoreLibTypeExtensions.IsNullOrEmptyId(IHasId<string>)
    SystemExtensions.GetName(object)
    • Edit this page
    • View Source
    In this article
    Back to top AI DevKit Documentation