struct

Anthropic::MessageParam

Inherits JSON::Serializable < Struct < Value < Object

MessageParam struct for API requests

Constructors

assistant(text : String) : self
Source
new(role : String | Role, content : String | Array(ContentBlock))
Source
new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source
user(text : String) : self

Convenience constructor for simple text messages

Source

Instance methods

content
Source
role
Source