use std::env;
use tinyhumansai::{RecallMemoryParams, TinyHumanConfig, TinyHumanMemoryClient};
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
// 1) Token + client.
let token = env::var("TINYHUMANS_TOKEN")?;
let client = TinyHumanMemoryClient::new(TinyHumanConfig::new(token))?;
// 2) Recall context with optional fields.
let response = client
.recall_memory(RecallMemoryParams {
namespace: Some("preferences".into()),
max_chunks: Some(10.0),
})
.await?;
// 3) Access LLM context and counts.
println!("{:?}", response.data.llm_context_message);
println!("{:?}", response.data.counts);
Ok(())
}