Table of Contents

TTMSMCPSamplingMessages Class

Ordered conversation that is sent with a completion request.

API unit family: TMS.MCP.Sampling Inherits from: TList<TTMSMCPSamplingMessage>

Syntax

TTMSMCPSamplingMessages = class(TList<TTMSMCPSamplingMessage>)

Remarks

The turns are held in the order the model should read them. Being a plain list, it does not take ownership of the turns it holds.

Methods

Name Description
AddAssistantMessage Creates a text turn attributed to the assistant and appends it to the conversation, to replay an earlier model reply as part of the history.
AddUserImageMessage Creates an image turn attributed to the user and appends it to the conversation.
AddUserMessage Creates a text turn attributed to the user and appends it to the conversation.
ToJSON Builds the payload representation of the whole conversation.