class MCProtocol::CreateMessageResult

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

Defined in:

mcprotocol/create_message_result.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(content : TextContent | ImageContent, model : String, role : Role, _meta : JSON::Any | Nil = Nil, stopReason : String | Nil = Nil) #

[View source]
def self.new(pull : JSON::PullParser) #

[View source]

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.


[View source]
def content : TextContent | ImageContent #

[View source]
def model : String #

The name of the model that generated the message.


[View source]
def role : Role #

[View source]
def stopReason : String | Nil #

The reason why sampling stopped, if known.


[View source]