Table of Contents

TTMSFNCCloudAI.CreateMessage Method

Adds a message to an assistant thread.

API unit family: TMSFNCCloudAI Declaring type: TTMSFNCCloudAI

Syntax

procedure CreateMessage(const AThreadID, ARole, AContent: string; AFiles: TStrings; ATool: TTMSFNCCloudAIAssistantTool; const ACreated: TTMSFNCCloudAICreatedEvent = nil; const AFailed: TTMSFNCCloudAIRunEvent = nil);

Parameters

Name Description
AThreadID Identifier of the thread that receives the message.
ARole Role assigned to the message.
AContent Message content.
AFiles Optional list of file identifiers associated with the message.
ATool Assistant tool capability associated with the message attachments.
ACreated Optional callback invoked when the message is created.
AFailed Optional callback invoked when the request fails.