struct AI::Provider::LanguageModel::Usage

Overview

Usage information for a language model call.

Included Modules

Defined in:

ai/provider/language_model/types.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(input_tokens : InputTokens, output_tokens : OutputTokens, raw : JSON::Any | Nil = nil) #

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

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

[View source]

Instance Method Detail

def input_tokens : InputTokens #

Information about input tokens.


[View source]
def output_tokens : OutputTokens #

Information about output tokens.


[View source]
def raw : JSON::Any | Nil #

Raw usage information from the provider.


[View source]