class
MCProtocol::CreateMessageResult
- MCProtocol::CreateMessageResult
- Reference
- Object
Overview
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.
Included Modules
- JSON::Serializable
Defined in:
mcprotocol/create_message_result.crConstructors
- .new(content : TextContent | ImageContent, model : String, role : Role, _meta : JSON::Any | Nil = Nil, stopReason : String | Nil = Nil)
- .new(pull : JSON::PullParser)
Instance Method Summary
-
#_meta : JSON::Any | Nil
This result property is reserved by the protocol to allow clients and servers to attach additional metadata to their responses.
- #content : TextContent | ImageContent
-
#model : String
The name of the model that generated the message.
- #role : Role
-
#stopReason : String | Nil
The reason why sampling stopped, if known.
Constructor Detail
def self.new(content : TextContent | ImageContent, model : String, role : Role, _meta : JSON::Any | Nil = Nil, stopReason : String | Nil = Nil)
#
Instance Method Detail
def _meta : JSON::Any | Nil
#
This result property is reserved by the protocol to allow clients and servers to attach additional metadata to their responses.