use gpt5::{Gpt5Client, Gpt5Model};
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let api_key =
std::env::var("OPENAI_API_KEY").expect("Please set OPENAI_API_KEY environment variable");
let client = Gpt5Client::new(api_key);
println!("🤖 Asking GPT-5 Nano a simple question...");
let response = client
.simple(Gpt5Model::Gpt5Nano, "What is the capital of France?")
.await?;
println!("Response: {}", response);
println!("\n🤖 Asking GPT-5 Mini...");
let response = client
.simple(
Gpt5Model::Gpt5Mini,
"Explain quantum computing in simple terms",
)
.await?;
println!("Response: {}", response);
println!("\n🤖 Asking GPT-5 (main model)...");
let response = client
.simple(Gpt5Model::Gpt5, "Write a short poem about coding")
.await?;
println!("Response: {}", response);
Ok(())
}