use anyhow::Result;
use rag_module::{RagModule};

#[tokio::main]
async fn main() -> Result<()> {
    println!("🔍 Testing get_decrypted_chat_history function with fresh data");

    // Initialize RAG module with same directory but fresh start
    let mut rag_module = RagModule::new("./example-enhanced-chat-data").await?;
    rag_module.initialize().await?;

    // Create a simple conversation
    let user_id = "cudewvsbxakj1n";
 

    // Now test our decrypt function
    println!("\n🔓 Testing get_decrypted_chat_history:");
    let decrypted_history = rag_module.get_decrypted_chat_history(user_id).await?;

    println!("{}", serde_json::to_string_pretty(&decrypted_history)?);


    Ok(())
}