struct AI::Provider::LanguageModel::InputTokens

Overview

Information about input tokens.

Included Modules

Defined in:

ai/provider/language_model/types.cr

Constructors

Instance Method Summary

Constructor Detail

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

[View source]
def self.new(total : Int32 | Nil = nil, no_cache : Int32 | Nil = nil, cache_read : Int32 | Nil = nil, cache_write : Int32 | Nil = nil) #

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

[View source]

Instance Method Detail

def cache_read : Int32 | Nil #

Number of cached input tokens read.


[View source]
def cache_write : Int32 | Nil #

Number of cached input tokens written.


[View source]
def no_cache : Int32 | Nil #

Number of non-cached input tokens.


[View source]
def total : Int32 | Nil #

Total number of input (prompt) tokens used.


[View source]