struct AI::Provider::ImageModel::Usage

Overview

Usage information for an image model call.

Included Modules

Defined in:

ai/provider/image_model/image_model.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(pull : JSON::PullParser) #

[View source]
def self.new(input_tokens : Int32 | Nil = nil, output_tokens : Int32 | Nil = nil, total_tokens : Int32 | Nil = nil) #

[View source]
def self.new(*, __pull_for_json_serializable pull : JSON::PullParser) #

[View source]

Instance Method Detail

def input_tokens : Int32 | Nil #

The number of input (prompt) tokens used.


[View source]
def output_tokens : Int32 | Nil #

The number of output tokens used, if reported by the provider.


[View source]
def total_tokens : Int32 | Nil #

The total number of tokens as reported by the provider.


[View source]