pub struct UsageQueryParamsArgs { /* private fields */ }administration-types only.Expand description
Builder for UsageQueryParams.
Implementations§
Source§impl UsageQueryParamsArgs
impl UsageQueryParamsArgs
Sourcepub fn start_time<VALUE: Into<u64>>(&mut self, value: VALUE) -> &mut Self
pub fn start_time<VALUE: Into<u64>>(&mut self, value: VALUE) -> &mut Self
Start time (Unix seconds) of the query time range, inclusive.
Sourcepub fn end_time<VALUE: Into<u64>>(&mut self, value: VALUE) -> &mut Self
pub fn end_time<VALUE: Into<u64>>(&mut self, value: VALUE) -> &mut Self
End time (Unix seconds) of the query time range, exclusive.
Sourcepub fn bucket_width<VALUE: Into<UsageBucketWidth>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn bucket_width<VALUE: Into<UsageBucketWidth>>( &mut self, value: VALUE, ) -> &mut Self
Width of each time bucket in response. Currently 1m, 1h and 1d are supported, default to 1d.
Sourcepub fn project_ids<VALUE: Into<Vec<String>>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn project_ids<VALUE: Into<Vec<String>>>( &mut self, value: VALUE, ) -> &mut Self
Return only usage for these projects.
Sourcepub fn user_ids<VALUE: Into<Vec<String>>>(&mut self, value: VALUE) -> &mut Self
pub fn user_ids<VALUE: Into<Vec<String>>>(&mut self, value: VALUE) -> &mut Self
Return only usage for these users.
Sourcepub fn api_key_ids<VALUE: Into<Vec<String>>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn api_key_ids<VALUE: Into<Vec<String>>>( &mut self, value: VALUE, ) -> &mut Self
Return only usage for these API keys.
Sourcepub fn models<VALUE: Into<Vec<String>>>(&mut self, value: VALUE) -> &mut Self
pub fn models<VALUE: Into<Vec<String>>>(&mut self, value: VALUE) -> &mut Self
Return only usage for these models.
Sourcepub fn batch<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self
pub fn batch<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self
If true, return batch jobs only. If false, return non-batch jobs only. By default, return both.
Sourcepub fn group_by<VALUE: Into<Vec<UsageGroupBy>>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn group_by<VALUE: Into<Vec<UsageGroupBy>>>( &mut self, value: VALUE, ) -> &mut Self
Group the usage data by the specified fields.
Sourcepub fn limit<VALUE: Into<u32>>(&mut self, value: VALUE) -> &mut Self
pub fn limit<VALUE: Into<u32>>(&mut self, value: VALUE) -> &mut Self
Specifies the number of buckets to return.
Sourcepub fn page<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
pub fn page<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
A cursor for use in pagination. Corresponding to the next_page field from the previous response.
Sourcepub fn line_items<VALUE: Into<Vec<String>>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn line_items<VALUE: Into<Vec<String>>>( &mut self, value: VALUE, ) -> &mut Self
Return only costs for these line items.
Sourcepub fn vector_store_ids<VALUE: Into<Vec<String>>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn vector_store_ids<VALUE: Into<Vec<String>>>( &mut self, value: VALUE, ) -> &mut Self
Return file-search usage for these vector stores.
Sourcepub fn context_levels<VALUE: Into<Vec<String>>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn context_levels<VALUE: Into<Vec<String>>>( &mut self, value: VALUE, ) -> &mut Self
Return web-search usage for these context levels: low, medium, or high.
Sourcepub fn build(&self) -> Result<UsageQueryParams, OpenAIError>
pub fn build(&self) -> Result<UsageQueryParams, OpenAIError>
Trait Implementations§
Source§impl Clone for UsageQueryParamsArgs
impl Clone for UsageQueryParamsArgs
Source§fn clone(&self) -> UsageQueryParamsArgs
fn clone(&self) -> UsageQueryParamsArgs
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more