Table of Contents

Class ToolMessage

Namespace
Glitch9.AIDevKit

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

public class ToolMessage : Message, IPromptWithFiles, IPrompt, IModeratable
Inheritance
object
ToolMessage
Implements
Inherited Members
Extension Methods

Constructors

ToolMessage()

public ToolMessage()

ToolMessage(MessageContent)

public ToolMessage(MessageContent content)

Parameters

content MessageContent

ToolMessage(string, string)

public ToolMessage(string toolCallId, string result)

Parameters

toolCallId string
result string

Properties

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

ToolCallId

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

public string ToolCallId { get; set; }

Property Value

string

Operators

implicit operator string(ToolMessage)

public static implicit operator string(ToolMessage message)

Parameters

message ToolMessage

Returns

string