use funera_orchestrate::{Agent, AgentRuntime, DeepSeekProvider};
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let runtime = AgentRuntime::<DeepSeekProvider>::builder()
.api_key(std::env::var("OPENAI_API_KEY")?)
.base_url(std::env::var("OPENAI_BASE_URL").ok())
.model(std::env::var("OPENAI_MODEL").unwrap_or_else(|_| "deepseek-v4-flash".into()))
.build()?;
let agent = Agent::builder()
.system_prompt("You speak like a pirate.")
.build();
let resp = agent
.fire("Tell me about Rust programming.", &runtime)
.await?;
println!("=== Response ===");
println!("{}", resp.content);
println!();
println!("Iterations: {}", resp.iterations);
println!("Finish reason: {:?}", resp.finish_reason);
Ok(())
}