struct ChatGPT::PostData
- ChatGPT::PostData
- Struct
- Value
- Object
Included Modules
- JSON::Serializable
Defined in:
chatgpt/post_data.crConstructors
- .new(pull : JSON::PullParser)
- .new(model : String = "gpt-3.5-turbo", messages : Array(Hash(String, String)) = [] of Hash(String, String), n : Int32 = 1, temperature : Float64 = 1.0, top_p : Float64 = 1.0)
Instance Method Summary
- #add_message(role : String, content : String)
- #count_user_messages
- #messages : Array(Hash(String, String))
- #messages=(messages : Array(Hash(String, String)))
- #model : String
- #model=(model : String)
- #n : Int32
- #n=(n : Int32)
- #temperature : Float64
- #temperature=(temperature : Float64)
- #top_p : Float64
- #top_p=(top_p : Float64)
- #user_messages
Constructor Detail
def self.new(model : String = "gpt-3.5-turbo", messages : Array(Hash(String, String)) = [] of Hash(String, String), n : Int32 = 1, temperature : Float64 = 1.0, top_p : Float64 = 1.0)
#