Skip to content

struct OpenAI::CompletionRequest
inherits Struct #

Included modules

JSON::Serializable

Constructors#

.new(model : String, prompt : String | Array(String) | Nil = nil, suffix : String | Nil = nil, max_tokens : Int32 | Nil = nil, temperature : Float32 | Nil = nil, top_p : Float32 | Nil = nil, n : Int32 | Nil = nil, stream : Bool | Nil = nil, log_probs : Int32 | Nil = nil, echo : Bool | Nil = nil, stop : Array(String) | Nil = nil, presence_penalty : Float32 | Nil = nil, frequency_penalty : Float32 | Nil = nil, best_of : Int32 | Nil = nil, logit_bias : Hash(String, Int32) | Nil = nil, user : String | Nil = nil)#

View source

.new(pull : JSON::PullParser)#

View source

Methods#

#best_of : Int32 | ::Nil#

#clone#

View source

#copy_with(model _model = @model, prompt _prompt = @prompt, suffix _suffix = @suffix, max_tokens _max_tokens = @max_tokens, temperature _temperature = @temperature, top_p _top_p = @top_p, n _n = @n, stream _stream = @stream, log_probs _log_probs = @log_probs, echo _echo = @echo, stop _stop = @stop, presence_penalty _presence_penalty = @presence_penalty, frequency_penalty _frequency_penalty = @frequency_penalty, best_of _best_of = @best_of, logit_bias _logit_bias = @logit_bias, user _user = @user)#

View source

#echo : Bool | ::Nil#

#frequency_penalty : Float32 | ::Nil#

#log_probs : Int32 | ::Nil#

#logit_bias : Hash(String, Int32) | ::Nil#

#max_tokens : Int32 | ::Nil#

#model : String#

#n : Int32 | ::Nil#

#presence_penalty : Float32 | ::Nil#

#prompt : String | Array(String) | Nil#

#stop : Array(String) | ::Nil#

#stream : Bool | ::Nil#

#suffix : String | ::Nil#

#temperature : Float32 | ::Nil#

#top_p : Float32 | ::Nil#

#user : String | ::Nil#