Files
momentry_core/test_qdrant.rs
Warren b54c2def30 feat: add migrations, test scripts, and utility tools
- Add database migrations (006-028) for face recognition, identity, file_uuid
- Add test scripts for ASR, face, search, processing
- Add portal frontend (Tauri)
- Add config, benchmark, and monitoring utilities
- Add model checkpoints and pretrained model references
2026-04-30 15:11:53 +08:00

46 lines
1.6 KiB
Rust

use reqwest::Client;
use std::env;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
// Set environment variables
env::set_var("QDRANT_URL", "http://localhost:6333");
env::set_var("QDRANT_API_KEY", "Test3200Test3200Test3200");
env::set_var("QDRANT_COLLECTION", "momentry_rule1");
let base_url = env::var("QDRANT_URL").unwrap_or_else(|_| "http://localhost:6333".to_string());
let api_key =
env::var("QDRANT_API_KEY").unwrap_or_else(|_| "Test3200Test3200Test3200".to_string());
let collection_name =
env::var("QDRANT_COLLECTION").unwrap_or_else(|_| "momentry_rule1".to_string());
println!("Testing Qdrant connection...");
println!("Base URL: {}", base_url);
println!("API Key: {}", api_key);
println!("Collection: {}", collection_name);
let client = Client::new();
let url = format!("{}/collections/{}", base_url, collection_name);
match client.get(&url).header("api-key", &api_key).send().await {
Ok(response) => {
if response.status().is_success() {
println!("✅ Qdrant connection successful!");
let body = response.text().await?;
println!("Response: {}", body);
} else {
println!(
"❌ Qdrant connection failed with status: {}",
response.status()
);
println!("Response: {:?}", response.text().await);
}
}
Err(e) => {
println!("❌ Qdrant connection error: {}", e);
}
}
Ok(())
}