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(&self) -> Result<UsageResponse, OpenAIError>
pub async fn audio_speeches(&self) -> 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<R: DeserializeOwned>(
&self,
) -> Result<R, OpenAIError>
pub async fn audio_speeches_byot<R: DeserializeOwned>( &self, ) -> Result<R, OpenAIError>
Get audio speeches usage details for the organization.
Sourcepub async fn audio_transcriptions(&self) -> Result<UsageResponse, OpenAIError>
pub async fn audio_transcriptions(&self) -> 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<R: DeserializeOwned>(
&self,
) -> Result<R, OpenAIError>
pub async fn audio_transcriptions_byot<R: DeserializeOwned>( &self, ) -> Result<R, OpenAIError>
Get audio transcriptions usage details for the organization.
Sourcepub async fn code_interpreter_sessions(
&self,
) -> Result<UsageResponse, OpenAIError>
pub async fn code_interpreter_sessions( &self, ) -> 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<R: DeserializeOwned>(
&self,
) -> Result<R, OpenAIError>
pub async fn code_interpreter_sessions_byot<R: DeserializeOwned>( &self, ) -> Result<R, OpenAIError>
Get code interpreter sessions usage details for the organization.
Sourcepub async fn completions(&self) -> Result<UsageResponse, OpenAIError>
pub async fn completions(&self) -> Result<UsageResponse, OpenAIError>
Get completions usage details for the organization. Get completions usage details for the organization.
Sourcepub async fn completions_byot<R: DeserializeOwned>(
&self,
) -> Result<R, OpenAIError>
pub async fn completions_byot<R: DeserializeOwned>( &self, ) -> Result<R, OpenAIError>
Get completions usage details for the organization.
Sourcepub async fn embeddings(&self) -> Result<UsageResponse, OpenAIError>
pub async fn embeddings(&self) -> Result<UsageResponse, OpenAIError>
Get embeddings usage details for the organization. Get embeddings usage details for the organization.
Sourcepub async fn embeddings_byot<R: DeserializeOwned>(
&self,
) -> Result<R, OpenAIError>
pub async fn embeddings_byot<R: DeserializeOwned>( &self, ) -> Result<R, OpenAIError>
Get embeddings usage details for the organization.
Sourcepub async fn images(&self) -> Result<UsageResponse, OpenAIError>
pub async fn images(&self) -> Result<UsageResponse, OpenAIError>
Get images usage details for the organization. Get images usage details for the organization.
Sourcepub async fn images_byot<R: DeserializeOwned>(&self) -> Result<R, OpenAIError>
pub async fn images_byot<R: DeserializeOwned>(&self) -> Result<R, OpenAIError>
Get images usage details for the organization.
Sourcepub async fn moderations(&self) -> Result<UsageResponse, OpenAIError>
pub async fn moderations(&self) -> Result<UsageResponse, OpenAIError>
Get moderations usage details for the organization. Get moderations usage details for the organization.
Sourcepub async fn moderations_byot<R: DeserializeOwned>(
&self,
) -> Result<R, OpenAIError>
pub async fn moderations_byot<R: DeserializeOwned>( &self, ) -> Result<R, OpenAIError>
Get moderations usage details for the organization.
Sourcepub async fn vector_stores(&self) -> Result<UsageResponse, OpenAIError>
pub async fn vector_stores(&self) -> 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<R: DeserializeOwned>(
&self,
) -> Result<R, OpenAIError>
pub async fn vector_stores_byot<R: DeserializeOwned>( &self, ) -> Result<R, OpenAIError>
Get vector stores usage details for the organization.
Sourcepub async fn costs(&self) -> Result<UsageResponse, OpenAIError>
pub async fn costs(&self) -> Result<UsageResponse, OpenAIError>
Get costs details for the organization. Get costs details for the organization.
Sourcepub async fn costs_byot<R: DeserializeOwned>(&self) -> Result<R, OpenAIError>
pub async fn costs_byot<R: DeserializeOwned>(&self) -> Result<R, OpenAIError>
Get costs details for the organization.