class

OpenAI::RunCompletionUsageVariant1

Inherits JSON::Serializable < Reference < Object

Usage statistics related to the run. This value will be null if the run is not in a terminal state (i.e. in_progress, queued, etc.).

Constructors

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

Instance methods

completion_tokens

Number of completion tokens used over the course of the run.

Source
completion_tokens=(completion_tokens : Int64)

Number of completion tokens used over the course of the run.

Source
prompt_tokens

Number of prompt tokens used over the course of the run.

Source
prompt_tokens=(prompt_tokens : Int64)

Number of prompt tokens used over the course of the run.

Source
total_tokens

Total number of tokens used (prompt + completion).

Source
total_tokens=(total_tokens : Int64)

Total number of tokens used (prompt + completion).

Source