Expand description
OpenAI Models API Request Module
This module provides the functionality to interact with the OpenAI Models API. It allows you to list, retrieve, and delete models available in the OpenAI platform.
§Key Features
- List Models: Retrieve all available models
- Retrieve Model: Get details of a specific model
- Delete Model: Delete a fine-tuned model (only for models you own)
§Quick Start
use openai_tools::models::request::Models;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let models = Models::new()?;
// List all available models
let response = models.list().await?;
for model in &response.data {
println!("{}: owned by {}", model.id, model.owned_by);
}
Ok(())
}Structs§
- Models
- Client for interacting with the OpenAI Models API.