Open Sidebar
Close Sidebar
CrystalDoc.info
Source code
Shards.info
openai
main
OpenAI
AuthenticationError
Client
Configuration
Message
Model
Usage
OpenAIError
RateLimitError
Openai
Generated using Crystal 1.10.1
2024-02-02 17:00:06 UTC
class
OpenAI::
Message
OpenAI::Message
Reference
Object
Included Modules
JSON::Serializable
Defined in:
openai/model.cr
Constructors
.new
(role : String, content : String)
.new
(pull : JSON::PullParser)
Instance Method Summary
#content
: String
#content=
(content : String)
#role
: String
#role=
(role : String)
#to_hash
Constructor Detail
def self.
new
(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
#
[
View source
]
def
role=
(role : String)
#
[
View source
]
def
to_hash
#
[
View source
]