struct

AI::Provider::LanguageModel::InputTokens

Inherits JSON::Serializable < Struct < Value < Object

Information about input tokens.

Constructors

new(total : Int32 | Nil = nil, no_cache : Int32 | Nil = nil, cache_read : Int32 | Nil = nil, cache_write : Int32 | Nil = nil)
Source
new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source

Instance methods

cache_read

Number of cached input tokens read.

Source
cache_write

Number of cached input tokens written.

Source
no_cache

Number of non-cached input tokens.

Source
total

Total number of input (prompt) tokens used.

Source