pub struct UsageCompletionsResult {
pub input_tokens: u64,
pub input_cached_tokens: Option<u64>,
pub output_tokens: u64,
pub input_audio_tokens: Option<u64>,
pub output_audio_tokens: Option<u64>,
pub num_model_requests: u64,
pub project_id: Option<String>,
pub user_id: Option<String>,
pub api_key_id: Option<String>,
pub model: Option<String>,
pub batch: Option<bool>,
}
Expand description
The aggregated completions usage details of the specific time bucket.
Fields§
§input_tokens: u64
The aggregated number of text input tokens used, including cached tokens. For customers subscribe to scale tier, this includes scale tier tokens.
input_cached_tokens: Option<u64>
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.
output_tokens: u64
The aggregated number of text output tokens used. For customers subscribe to scale tier, this includes scale tier tokens.
input_audio_tokens: Option<u64>
The aggregated number of audio input tokens used, including cached tokens.
output_audio_tokens: Option<u64>
The aggregated number of audio output tokens used.
num_model_requests: u64
The count of requests made to the model.
project_id: Option<String>
When group_by=project_id
, this field provides the project ID of the grouped usage result.
user_id: Option<String>
When group_by=user_id
, this field provides the user ID of the grouped usage result.
api_key_id: Option<String>
When group_by=api_key_id
, this field provides the API key ID of the grouped usage result.
model: Option<String>
When group_by=model
, this field provides the model name of the grouped usage result.
batch: Option<bool>
When group_by=batch
, this field tells whether the grouped usage result is batch or not.
Implementations§
Source§impl UsageCompletionsResult
impl UsageCompletionsResult
Sourcepub fn builder() -> UsageCompletionsResultBuilder<((), (), (), (), (), (), (), (), (), (), ())>
pub fn builder() -> UsageCompletionsResultBuilder<((), (), (), (), (), (), (), (), (), (), ())>
Create a builder for building UsageCompletionsResult
.
On the builder, call .input_tokens(...)
, .input_cached_tokens(...)
(optional), .output_tokens(...)
, .input_audio_tokens(...)
(optional), .output_audio_tokens(...)
(optional), .num_model_requests(...)
, .project_id(...)
(optional), .user_id(...)
(optional), .api_key_id(...)
(optional), .model(...)
(optional), .batch(...)
(optional) to set the values of the fields.
Finally, call .build()
to create the instance of UsageCompletionsResult
.
Trait Implementations§
Source§impl Clone for UsageCompletionsResult
impl Clone for UsageCompletionsResult
Source§fn clone(&self) -> UsageCompletionsResult
fn clone(&self) -> UsageCompletionsResult
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more