// This example demonstrates a basic chat interaction without the TUI. use owlen_core::model::Model; use owlen_core::provider::Provider; use owlen_core::session::Session; use owlen_ollama::OllamaProvider; // Assuming you have an Ollama provider #[tokio::main] async fn main() -> Result<(), anyhow::Error> { // This example requires a running Ollama instance. // Make sure you have a model available, e.g., `ollama pull llama2` let provider = OllamaProvider; let model = Model::new("llama2"); // Change to a model you have let mut session = Session::new("basic-chat-session"); println!("Starting basic chat with model: {}", model.name); let user_message = "What is the capital of France?"; session.add_message("user", user_message); println!("User: {}", user_message); // Send the chat to the provider let response = provider.chat(&session, &model).await?; session.add_message("bot", &response); println!("Bot: {}", response); Ok(()) }