use rig::{completion::Prompt, providers};
use solagent::fetch_price::FetchPrice;
#[tokio::main]
async fn main() -> Result<(), String> {
let token_id = "So11111111111111111111111111111111111111112";
let prompt = format!("fetch price of token_id {}", token_id);
let client = providers::openai::Client::from_url("ollama", "http://localhost:11434/v1");
let comedian_agent = client
.agent("llama3.2")
.preamble(
"You are an assistant here to help the user select which tool is most appropriate to perform operations.",
)
.tool(FetchPrice)
.build();
let response = comedian_agent.prompt(&prompt).await.unwrap();
println!("{}", response);
Ok(())
}