Open Sidebar
Close Sidebar
CrystalDoc.info
Source code
Shards.info
crystal-mistral
main
APIError
ChatRequest
ChatResponse
Choice
CodeRequest
CrystalMistral
Client
ClientBuilder
EmbeddingObject
EmbeddingRequest
EmbeddingResponse
Message
Messages
Role
Usage
UsageInfo
ValidationDetails
ValidationError
ValidationSubError
Generated using Crystal 1.16.3
2025-06-23 11:23:07 UTC
struct
Messages
Messages
Struct
Value
Object
Overview
Represents a single message in the chat input payload
Included Modules
JSON::Serializable
Defined in:
crystal-mistral/types.cr
Constructors
.new
(role : Role | String, content : String)
.new
(pull : JSON::PullParser)
Instance Method Summary
#content
: String
#content=
(content : String)
#role
: String | Role
#role=
(role : String | Role)
Constructor Detail
def self.
new
(role :
Role
| String, content : String)
#
[
View source
]
def self.
new
(pull : JSON::PullParser)
#
[
View source
]
Instance Method Detail
def
content
: String
#
[
View source
]
def
content=
(content : String)
#
[
View source
]
def
role
: String |
Role
#
[
View source
]
def
role=
(role : String |
Role
)
#
[
View source
]