use std::env;
use bep::{
completion::Prompt,
providers::anthropic::{self, CLAUDE_3_5_SONNET},
};
#[tokio::main]
async fn main() -> Result<(), anyhow::Error> {
let client = anthropic::ClientBuilder::new(
&env::var("ANTHROPIC_API_KEY").expect("ANTHROPIC_API_KEY not set"),
)
.build();
let agent = client
.agent(CLAUDE_3_5_SONNET)
.preamble("Be precise and concise.")
.temperature(0.5)
.build();
let response = agent
.prompt("When and where and what type is the next solar eclipse?")
.await?;
println!("{}", response);
Ok(())
}