Table of Contents

TTMSMCPSamplingRequest.ToJSON Method

Builds the payload of the completion request.

API unit family: TMS.MCP.Sampling Declaring type: TTMSMCPSamplingRequest

Syntax

function ToJSON(AIncludeToolsFields: Boolean = True): TJSONValue;

Parameters

Name Description
AIncludeToolsFields When True, the tool definitions and the tool constraint are added to the payload; when False, they are left out, for a client that does not support tool use. Defaults to True.

Returns

A new object holding the conversation, the context scope, the temperature and the token limit. The instructions, the stop sequences, the metadata and the model preferences are added only when they carry something other than their default. The caller owns the returned value.