class

OpenAI::EvalRunOutputItemSampleUsage

Inherits JSON::Serializable < Reference < Object

Token usage details for the sample.

Constructors

new(total_tokens : Int64 = 0, completion_tokens : Int64 = 0, prompt_tokens : Int64 = 0, cached_tokens : Int64 = 0)
Source
new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source

Instance methods

cached_tokens

The number of tokens retrieved from cache.

Source
cached_tokens=(cached_tokens : Int64)

The number of tokens retrieved from cache.

Source
completion_tokens

The number of completion tokens generated.

Source
completion_tokens=(completion_tokens : Int64)

The number of completion tokens generated.

Source
prompt_tokens

The number of prompt tokens used.

Source
prompt_tokens=(prompt_tokens : Int64)

The number of prompt tokens used.

Source
total_tokens

The total number of tokens used.

Source
total_tokens=(total_tokens : Int64)

The total number of tokens used.

Source