use momentry_core::core::embedding::comic_embed::Embedder;

#[tokio::main]
async fn main() {
    let embedder = Embedder::new("nomic-embed-text-v2-moe:latest".to_string());

    // Test English text
    match embedder.embed_document("file transfer").await {
        Ok(vector) => println!(
            "English vector length: {}, first 5 values: {:?}",
            vector.len(),
            &vector[..5]
        ),
        Err(e) => println!("Error embedding English: {}", e),
    }

    // Test Chinese text
    match embedder.embed_document("檔案傳輸").await {
        Ok(vector) => println!(
            "Chinese vector length: {}, first 5 values: {:?}",
            vector.len(),
            &vector[..5]
        ),
        Err(e) => println!("Error embedding Chinese: {}", e),
    }

    // Test similarity between the two
    match embedder.embed_query("檔案傳輸").await {
        Ok(vector) => println!(
            "Chinese query vector length: {}, first 5 values: {:?}",
            vector.len(),
            &vector[..5]
        ),
        Err(e) => println!("Error embedding Chinese query: {}", e),
    }
}
