Run vectorize command
(path: String, collection: String, db_path: String, config: Option<Config>)
| 4 | |
| 5 | /// Run vectorize command |
| 6 | pub async fn run_vectorize(path: String, collection: String, db_path: String, config: Option<Config>) -> Result<(), Box<dyn std::error::Error>> { |
| 7 | info!("Starting vectorize command"); |
| 8 | info!("Path: {}", path); |
| 9 | info!("Collection: {}", collection); |
| 10 | info!("LanceDB Path: {}", db_path); |
| 11 | |
| 12 | // Create vectorize service |
| 13 | let service = EmbeddingService::new(&db_path, collection, config.as_ref(), None).await?; |
| 14 | |
| 15 | // Ensure collection exists |
| 16 | service.ensure_collection().await?; |
| 17 | |
| 18 | // Vectorize directory |
| 19 | service.vectorize_directory(&path, None).await?; |
| 20 | |
| 21 | info!("Vectorize command completed successfully"); |
| 22 | Ok(()) |
| 23 | } |
nothing calls this directly
no test coverage detected