#[non_exhaustive]pub struct UsageCompletionsResult {
pub api_key_id: Option<String>,
pub batch: Option<bool>,
pub input_audio_tokens: Option<i32>,
pub input_tokens: i32,
pub model: Option<String>,
pub num_model_requests: i32,
pub object: String,
pub output_audio_tokens: Option<i32>,
pub output_tokens: i32,
pub project_id: Option<String>,
pub input_cached_tokens: Option<i32>,
pub user_id: Option<String>,
}Expand description
Represents aggregated usage details for the Completions API within a time bucket.
§Used By
UsageResult::Completions
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.api_key_id: Option<String>The API key ID if grouped by api_key_id.
batch: Option<bool>Whether the usage result is for batch jobs if grouped by batch.
input_audio_tokens: Option<i32>Aggregated number of audio input tokens used (including cached).
input_tokens: i32Aggregated number of text input tokens used (including cached).
model: Option<String>The model name if grouped by model.
num_model_requests: i32The count of requests made to the model.
object: StringObject type, always “organization.usage.completions.result”.
output_audio_tokens: Option<i32>Aggregated number of audio output tokens used.
output_tokens: i32Aggregated number of text output tokens used.
project_id: Option<String>The project ID if grouped by project_id.
input_cached_tokens: Option<i32>Aggregated number of cached text input tokens.
user_id: Option<String>The user ID if grouped by user_id.
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 moreSource§impl Debug for UsageCompletionsResult
impl Debug for UsageCompletionsResult
Source§impl<'de> Deserialize<'de> for UsageCompletionsResult
impl<'de> Deserialize<'de> for UsageCompletionsResult
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for UsageCompletionsResult
impl PartialEq for UsageCompletionsResult
impl StructuralPartialEq for UsageCompletionsResult
Auto Trait Implementations§
impl Freeze for UsageCompletionsResult
impl RefUnwindSafe for UsageCompletionsResult
impl Send for UsageCompletionsResult
impl Sync for UsageCompletionsResult
impl Unpin for UsageCompletionsResult
impl UnwindSafe for UsageCompletionsResult
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<C, E> EntryToVal<C> for Ewhere
C: Collection<Entry = E>,
impl<C, E> EntryToVal<C> for Ewhere
C: Collection<Entry = E>,
Source§type Val = <C as Collection>::Val
type Val = <C as Collection>::Val
Entry in complex collections.
For example, in a HashMap, while Entry might be a ( key, value ) tuple, Val might only be the value part.Source§fn entry_to_val(self) -> <E as EntryToVal<C>>::Val
fn entry_to_val(self) -> <E as EntryToVal<C>>::Val
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoResult<T> for T
impl<T> IntoResult<T> for T
type Err = Infallible
fn into_result(self) -> Result<T, <T as IntoResult<T>>::Err>
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<C, Val> ValToEntry<C> for Valwhere
C: CollectionValToEntry<Val>,
impl<C, Val> ValToEntry<C> for Valwhere
C: CollectionValToEntry<Val>,
Source§fn val_to_entry(self) -> <C as CollectionValToEntry<Val>>::Entry
fn val_to_entry(self) -> <C as CollectionValToEntry<Val>>::Entry
Invokes the val_to_entry function of the CollectionValToEntry trait to convert the value to an entry.
Source§type Entry = <C as CollectionValToEntry<Val>>::Entry
type Entry = <C as CollectionValToEntry<Val>>::Entry
Entry is defined by the Collection trait.