Search Results for

    Show / Hide Table of Contents

    Class ToolMessage

    API don't send these anymore. It is only used to send the tool outputs from the 'client' side.

    Inheritance
    object
    ConversationItem
    Message
    ToolMessage
    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.ReferenceEquals(object, object)
    Namespace: Glitch9.AIDevKit
    Assembly: Glitch9.AIDevKit.dll
    Syntax
    public sealed class ToolMessage : Message, IPrompt, IValidatable, IHasId<string>

    Constructors

    | Edit this page View Source

    ToolMessage()

    Declaration
    public ToolMessage()
    | Edit this page View Source

    ToolMessage(MessageContent)

    Declaration
    public ToolMessage(MessageContent content)
    Parameters
    Type Name Description
    MessageContent content
    | Edit this page View Source

    ToolMessage(string, string)

    Declaration
    public ToolMessage(string toolCallId, string result)
    Parameters
    Type Name Description
    string toolCallId
    string result

    Properties

    | 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

    ToolCallId

    Required. The ID of the tool call that produced this output.

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

    Operators

    | Edit this page View Source

    implicit operator string(ToolMessage)

    Declaration
    public static implicit operator string(ToolMessage message)
    Parameters
    Type Name Description
    ToolMessage 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