struct
AI::Provider::ImageModel::Usage
- AI::Provider::ImageModel::Usage
- Struct
- Value
- Object
Overview
Usage information for an image model call.
Included Modules
- JSON::Serializable
Defined in:
ai/provider/image_model/image_model.crConstructors
- .new(pull : JSON::PullParser)
- .new(input_tokens : Int32 | Nil = nil, output_tokens : Int32 | Nil = nil, total_tokens : Int32 | Nil = nil)
- .new(*, __pull_for_json_serializable pull : JSON::PullParser)
Instance Method Summary
-
#input_tokens : Int32 | Nil
The number of input (prompt) tokens used.
-
#output_tokens : Int32 | Nil
The number of output tokens used, if reported by the provider.
-
#total_tokens : Int32 | Nil
The total number of tokens as reported by the provider.
Constructor Detail
def self.new(input_tokens : Int32 | Nil = nil, output_tokens : Int32 | Nil = nil, total_tokens : Int32 | Nil = nil)
#