Struct async_openai::Models
source · pub struct Models<'c> { /* 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> Models<'c>
impl<'c> Models<'c>
pub fn new(client: &'c Client) -> 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.
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.
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.