ActionController::PromptMessage
Inherits YAML::Serializable < JSON::Serializable < Struct < Value < Object
a message returned by an MCP prompt, see ActionController::MCP
# starts a code review conversation
@[AC::MCP(prompt: true)]
def review(id : Int64) : Array(AC::PromptMessage)
[
AC::PromptMessage.user("Please review pull request #{id}"),
AC::PromptMessage.assistant("Which aspects should I focus on?"),
]
end
Constructors
assistant(text : String) : PromptMessage
Sourcenew(ctx : YAML::ParseContext, node : YAML::Nodes::Node)
Sourcenew(pull : JSON::PullParser)
Sourcenew(text : String, role : Role = Role::User)
Sourcenew(*, __pull_for_json_serializable pull : JSON::PullParser)
Sourcenew(*, __context_for_yaml_serializable ctx : YAML::ParseContext, __node_for_yaml_serializable node : YAML::Nodes::Node)
Sourceuser(text : String) : PromptMessage
SourceInstance methods
role
Sourcetext
Source