TTMSMCPSamplingResult Class
Reply the client returns after running a completion on the server's behalf.
API unit family: TMS.MCP.Sampling
Inherits from: TPersistent
Syntax
TTMSMCPSamplingResult = class(TPersistent)
Remarks
Besides the generated payload it reports which model actually ran, which may differ from the one the request hinted at, and why generation stopped.
Properties
| Name | Description |
|---|---|
| Content | Payload the model generated: text for an ordinary reply, and a tool invocation when the model paused to call a tool. |
| CustomStopReason | Provider-specific stop reason, kept when TTMSMCPSamplingResult.StopReason is ssrCustom. |
| Model | Name of the model that actually produced the reply, as reported by the client. |
| Role | Speaker the reply is attributed to. Defaults to smrAssistant. |
| StopReason | Reason generation stopped. Defaults to ssrEndTurn. |
Methods
| Name | Description |
|---|---|
| FromJSON | Creates a reply from the payload the client sent back. |
| ToJSON | Builds the payload representation of the reply. |