CreateMessageResult.text

Build a single-text-block reply, the common onSampling case: an assistant message whose content is one Content.makeText(text) block. Parity with Content.makeText / ElicitResult.accept — saves a handler from assembling the struct by hand. stopReason defaults to "endTurn" and role to "assistant".

struct CreateMessageResult
static @safe
text
(
string model
,
string text
,
string stopReason = "endTurn"
,
string role = "assistant"
)