Skip to content

struct OpenAI::Usage
inherits Struct #

Included modules

JSON::Serializable

Constructors#

.new(prompt_tokens : Int32, total_tokens : Int32, completion_tokens : Int32 | Nil = nil)#

View source

.new(pull : JSON::PullParser)#

View source

Methods#

#clone#

View source

#completion_tokens : Int32 | ::Nil#

#copy_with(prompt_tokens _prompt_tokens = @prompt_tokens, total_tokens _total_tokens = @total_tokens, completion_tokens _completion_tokens = @completion_tokens)#

View source

#prompt_tokens : Int32#

#total_tokens : Int32#