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-5.1", messages : Array(Hash(String, String)) = [] of Hash(String, String), temperature : Float64 = 1.0, top_p : Float64 = 1.0, max_output_tokens : Int32 | Nil = nil)
Instance Method Summary
- #add_message(role : String, content : String)
- #count_user_messages
- #max_output_tokens : Int32 | Nil
- #max_output_tokens=(max_output_tokens : Int32 | Nil)
- #messages : Array(Hash(String, String))
- #messages=(messages : Array(Hash(String, String)))
- #model : String
- #model=(model : String)
- #temperature : Float64
- #temperature=(temperature : Float64)
- #top_p : Float64
- #top_p=(top_p : Float64)
- #user_messages
Constructor Detail
def self.new(model : String = "gpt-5.1", messages : Array(Hash(String, String)) = [] of Hash(String, String), temperature : Float64 = 1.0, top_p : Float64 = 1.0, max_output_tokens : Int32 | Nil = nil)
#