chatbot/chatbot.rs
1mod common;
2
3use common::run_cli_loop;
4use tiny_loop::{Agent, llm::OpenAIProvider};
5
6#[tokio::main]
7async fn main() {
8 let api_key = std::env::var("LLM_API_KEY").expect("LLM_API_KEY not set");
9
10 let llm = OpenAIProvider::new()
11 .api_key(api_key)
12 .base_url("https://openrouter.ai/api/v1")
13 .model("google/gemini-3-flash-preview");
14
15 let agent = Agent::new(llm).system("You are a helpful assistant");
16
17 run_cli_loop(agent).await
18}