use rig::{
client::builder::DynClientBuilder, completion::Prompt, providers::anthropic::CLAUDE_3_7_SONNET,
};
#[tokio::main]
async fn main() {
let multi_client = DynClientBuilder::new();
let completion_openai = multi_client.agent("openai", "gpt-4o").unwrap();
let agent_openai = completion_openai
.preamble("You are a helpful assistant")
.build();
let completion_anthropic = multi_client.agent("anthropic", CLAUDE_3_7_SONNET).unwrap();
let agent_anthropic = completion_anthropic
.preamble("You are a helpful assistant")
.max_tokens(1024)
.build();
println!("Sending prompt: 'Hello world!'");
let res_openai = agent_openai.prompt("Hello world!").await.unwrap();
println!("Response from OpenAI (using gpt-4o): {res_openai}");
let res_anthropic = agent_anthropic.prompt("Hello world!").await.unwrap();
println!("Response from Anthropic (using Claude 3.7 Sonnet): {res_anthropic}");
}