class

OpenAI::UsageCompletionsResult

Inherits JSON::Serializable < Reference < Object

The aggregated completions usage details of the specific time bucket.

Constructors

new(object : UsageCompletionsResultObject = UsageCompletionsResultObject::OrganizationUsageCompletionsResult, input_tokens : Int64 = 0, input_cached_tokens : Int64 | Nil = nil, output_tokens : Int64 = 0, input_audio_tokens : Int64 | Nil = nil, output_audio_tokens : Int64 | Nil = nil, num_model_requests : Int64 = 0, project_id : UsageCompletionsResultProjectId | Nil = nil, user_id : UsageCompletionsResultUserId | Nil = nil, api_key_id : UsageCompletionsResultApiKeyId | Nil = nil, model : UsageCompletionsResultModel | Nil = nil, batch : UsageCompletionsResultBatch | Nil = nil, service_tier : UsageCompletionsResultServiceTier | Nil = nil)
Source
new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source

Instance methods

api_key_id
Source
api_key_id=(api_key_id : UsageCompletionsResultApiKeyId | Nil)
Source
batch
Source
batch=(batch : UsageCompletionsResultBatch | Nil)
Source
input_audio_tokens

The aggregated number of audio input tokens used, including cached tokens.

Source
input_audio_tokens=(input_audio_tokens : Int64 | Nil)

The aggregated number of audio input tokens used, including cached tokens.

Source
input_cached_tokens

The aggregated number of text input tokens that has been cached from previous requests. For customers subscribe to scale tier, this includes scale tier tokens.

Source
input_cached_tokens=(input_cached_tokens : Int64 | Nil)

The aggregated number of text input tokens that has been cached from previous requests. For customers subscribe to scale tier, this includes scale tier tokens.

Source
input_tokens

The aggregated number of text input tokens used, including cached tokens. For customers subscribe to scale tier, this includes scale tier tokens.

Source
input_tokens=(input_tokens : Int64)

The aggregated number of text input tokens used, including cached tokens. For customers subscribe to scale tier, this includes scale tier tokens.

Source
model
Source
model=(model : UsageCompletionsResultModel | Nil)
Source
num_model_requests

The count of requests made to the model.

Source
num_model_requests=(num_model_requests : Int64)

The count of requests made to the model.

Source
object
Source
object=(object : UsageCompletionsResultObject)
Source
output_audio_tokens

The aggregated number of audio output tokens used.

Source
output_audio_tokens=(output_audio_tokens : Int64 | Nil)

The aggregated number of audio output tokens used.

Source
output_tokens

The aggregated number of text output tokens used. For customers subscribe to scale tier, this includes scale tier tokens.

Source
output_tokens=(output_tokens : Int64)

The aggregated number of text output tokens used. For customers subscribe to scale tier, this includes scale tier tokens.

Source
project_id
Source
project_id=(project_id : UsageCompletionsResultProjectId | Nil)
Source
service_tier
Source
service_tier=(service_tier : UsageCompletionsResultServiceTier | Nil)
Source
user_id
Source
user_id=(user_id : UsageCompletionsResultUserId | Nil)
Source