pub struct Usage<'c, C: Config> { /* private fields */ }Expand description
Manage organization usage data. Get usage details for various API endpoints including completions, embeddings, images, audio, moderations, vector stores, and code interpreter sessions.
Implementations§
Source§impl<'c, C: Config> Usage<'c, C>
impl<'c, C: Config> Usage<'c, C>
pub fn new(client: &'c Client<C>) -> Self
Sourcepub async fn audio_speeches<Q>(
&self,
query: &Q,
) -> Result<UsageResponse, OpenAIError>
pub async fn audio_speeches<Q>( &self, query: &Q, ) -> Result<UsageResponse, OpenAIError>
Get audio speeches usage details for the organization. Get audio speeches usage details for the organization.
Sourcepub async fn audio_speeches_byot<T0: Serialize, R: DeserializeOwned>(
&self,
query: T0,
) -> Result<R, OpenAIError>
pub async fn audio_speeches_byot<T0: Serialize, R: DeserializeOwned>( &self, query: T0, ) -> Result<R, OpenAIError>
Get audio speeches usage details for the organization.
Sourcepub async fn audio_transcriptions<Q>(
&self,
query: &Q,
) -> Result<UsageResponse, OpenAIError>
pub async fn audio_transcriptions<Q>( &self, query: &Q, ) -> Result<UsageResponse, OpenAIError>
Get audio transcriptions usage details for the organization. Get audio transcriptions usage details for the organization.
Sourcepub async fn audio_transcriptions_byot<T0: Serialize, R: DeserializeOwned>(
&self,
query: T0,
) -> Result<R, OpenAIError>
pub async fn audio_transcriptions_byot<T0: Serialize, R: DeserializeOwned>( &self, query: T0, ) -> Result<R, OpenAIError>
Get audio transcriptions usage details for the organization.
Sourcepub async fn code_interpreter_sessions<Q>(
&self,
query: &Q,
) -> Result<UsageResponse, OpenAIError>
pub async fn code_interpreter_sessions<Q>( &self, query: &Q, ) -> Result<UsageResponse, OpenAIError>
Get code interpreter sessions usage details for the organization. Get code interpreter sessions usage details for the organization.
Sourcepub async fn code_interpreter_sessions_byot<T0: Serialize, R: DeserializeOwned>(
&self,
query: T0,
) -> Result<R, OpenAIError>
pub async fn code_interpreter_sessions_byot<T0: Serialize, R: DeserializeOwned>( &self, query: T0, ) -> Result<R, OpenAIError>
Get code interpreter sessions usage details for the organization.
Sourcepub async fn completions<Q>(
&self,
query: &Q,
) -> Result<UsageResponse, OpenAIError>
pub async fn completions<Q>( &self, query: &Q, ) -> Result<UsageResponse, OpenAIError>
Get completions usage details for the organization. Get completions usage details for the organization.
Sourcepub async fn completions_byot<T0: Serialize, R: DeserializeOwned>(
&self,
query: T0,
) -> Result<R, OpenAIError>
pub async fn completions_byot<T0: Serialize, R: DeserializeOwned>( &self, query: T0, ) -> Result<R, OpenAIError>
Get completions usage details for the organization.
Sourcepub async fn embeddings<Q>(
&self,
query: &Q,
) -> Result<UsageResponse, OpenAIError>
pub async fn embeddings<Q>( &self, query: &Q, ) -> Result<UsageResponse, OpenAIError>
Get embeddings usage details for the organization. Get embeddings usage details for the organization.
Sourcepub async fn embeddings_byot<T0: Serialize, R: DeserializeOwned>(
&self,
query: T0,
) -> Result<R, OpenAIError>
pub async fn embeddings_byot<T0: Serialize, R: DeserializeOwned>( &self, query: T0, ) -> Result<R, OpenAIError>
Get embeddings usage details for the organization.
Sourcepub async fn images<Q>(&self, query: &Q) -> Result<UsageResponse, OpenAIError>
pub async fn images<Q>(&self, query: &Q) -> Result<UsageResponse, OpenAIError>
Get images usage details for the organization. Get images usage details for the organization.
Sourcepub async fn images_byot<T0: Serialize, R: DeserializeOwned>(
&self,
query: T0,
) -> Result<R, OpenAIError>
pub async fn images_byot<T0: Serialize, R: DeserializeOwned>( &self, query: T0, ) -> Result<R, OpenAIError>
Get images usage details for the organization.
Sourcepub async fn moderations<Q>(
&self,
query: &Q,
) -> Result<UsageResponse, OpenAIError>
pub async fn moderations<Q>( &self, query: &Q, ) -> Result<UsageResponse, OpenAIError>
Get moderations usage details for the organization. Get moderations usage details for the organization.
Sourcepub async fn moderations_byot<T0: Serialize, R: DeserializeOwned>(
&self,
query: T0,
) -> Result<R, OpenAIError>
pub async fn moderations_byot<T0: Serialize, R: DeserializeOwned>( &self, query: T0, ) -> Result<R, OpenAIError>
Get moderations usage details for the organization.
Sourcepub async fn vector_stores<Q>(
&self,
query: &Q,
) -> Result<UsageResponse, OpenAIError>
pub async fn vector_stores<Q>( &self, query: &Q, ) -> Result<UsageResponse, OpenAIError>
Get vector stores usage details for the organization. Get vector stores usage details for the organization.
Sourcepub async fn vector_stores_byot<T0: Serialize, R: DeserializeOwned>(
&self,
query: T0,
) -> Result<R, OpenAIError>
pub async fn vector_stores_byot<T0: Serialize, R: DeserializeOwned>( &self, query: T0, ) -> Result<R, OpenAIError>
Get vector stores usage details for the organization.
Sourcepub async fn costs<Q>(&self, query: &Q) -> Result<UsageResponse, OpenAIError>
pub async fn costs<Q>(&self, query: &Q) -> Result<UsageResponse, OpenAIError>
Get costs details for the organization. Get costs details for the organization.
Sourcepub async fn costs_byot<T0: Serialize, R: DeserializeOwned>(
&self,
query: T0,
) -> Result<R, OpenAIError>
pub async fn costs_byot<T0: Serialize, R: DeserializeOwned>( &self, query: T0, ) -> Result<R, OpenAIError>
Get costs details for the organization.