pub struct Models<'c, C: Config> { /* private fields */ }
Expand description
List and describe the various models available in the API. You can refer to the Models documentation to understand what models are available and the differences between them.
Implementations§
Source§impl<'c, C: Config> Models<'c, C>
impl<'c, C: Config> Models<'c, C>
pub fn new(client: &'c Client<C>) -> Self
Sourcepub async fn list(&self) -> Result<ListModelResponse, OpenAIError>
pub async fn list(&self) -> Result<ListModelResponse, OpenAIError>
Lists the currently available models, and provides basic information about each one such as the owner and availability. Lists the currently available models, and provides basic information about each one such as the owner and availability.
Sourcepub async fn list_byot<R: DeserializeOwned>(&self) -> Result<R, OpenAIError>
pub async fn list_byot<R: DeserializeOwned>(&self) -> Result<R, OpenAIError>
Lists the currently available models, and provides basic information about each one such as the owner and availability.
Sourcepub async fn retrieve(&self, id: &str) -> Result<Model, OpenAIError>
pub async fn retrieve(&self, id: &str) -> Result<Model, OpenAIError>
Retrieves a model instance, providing basic information about the model such as the owner and permissioning. Retrieves a model instance, providing basic information about the model such as the owner and permissioning.
Sourcepub async fn retrieve_byot<T0: Display, R: DeserializeOwned>(
&self,
id: T0,
) -> Result<R, OpenAIError>
pub async fn retrieve_byot<T0: Display, R: DeserializeOwned>( &self, id: T0, ) -> Result<R, OpenAIError>
Retrieves a model instance, providing basic information about the model such as the owner and permissioning.
Sourcepub async fn delete(
&self,
model: &str,
) -> Result<DeleteModelResponse, OpenAIError>
pub async fn delete( &self, model: &str, ) -> Result<DeleteModelResponse, OpenAIError>
Delete a fine-tuned model. You must have the Owner role in your organization. Delete a fine-tuned model. You must have the Owner role in your organization.
Sourcepub async fn delete_byot<T0: Display, R: DeserializeOwned>(
&self,
model: T0,
) -> Result<R, OpenAIError>
pub async fn delete_byot<T0: Display, R: DeserializeOwned>( &self, model: T0, ) -> Result<R, OpenAIError>
Delete a fine-tuned model. You must have the Owner role in your organization.