class

MCProtocol::CreateMessageResult

Inherits JSON::Serializable < Reference < Object

The client's response to a sampling/create_message request from the server. The client should inform the user before returning the sampled message, to allow them to inspect the response (human in the loop) and decide whether to allow the server to see it.

Constructors

new(content : TextContent | ImageContent, model : String, role : Role, _meta : JSON::Any | Nil = Nil, stopReason : String | Nil = Nil)
Source
new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source

Instance methods

_meta

This result property is reserved by the protocol to allow clients and servers to attach additional metadata to their responses.

Source
content
Source
model

The name of the model that generated the message.

Source
role
Source
stopReason

The reason why sampling stopped, if known.

Source