struct
AI::Provider::LanguageModel::InputTokens
- AI::Provider::LanguageModel::InputTokens
- Struct
- Value
- Object
Overview
Information about input tokens.
Included Modules
- JSON::Serializable
Defined in:
ai/provider/language_model/types.crConstructors
- .new(pull : JSON::PullParser)
- .new(total : Int32 | Nil = nil, no_cache : Int32 | Nil = nil, cache_read : Int32 | Nil = nil, cache_write : Int32 | Nil = nil)
- .new(*, __pull_for_json_serializable pull : JSON::PullParser)
Instance Method Summary
-
#cache_read : Int32 | Nil
Number of cached input tokens read.
-
#cache_write : Int32 | Nil
Number of cached input tokens written.
-
#no_cache : Int32 | Nil
Number of non-cached input tokens.
-
#total : Int32 | Nil
Total number of input (prompt) tokens used.
Constructor Detail
def self.new(total : Int32 | Nil = nil, no_cache : Int32 | Nil = nil, cache_read : Int32 | Nil = nil, cache_write : Int32 | Nil = nil)
#