Skip to content

Commit 2e1ed5f

Browse files
committed
fix: qdrant exemple
1 parent c66dbcd commit 2e1ed5f

3 files changed

Lines changed: 14 additions & 2 deletions

File tree

Cargo.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/qdrant_example/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ publish = false
88
async-trait = "0.1"
99
tokio = "1.45.0"
1010
qdrant-client = "1.14.0"
11+
anyhow = "1"
1112

1213
[dependencies.vectorctl]
1314
path = "../../"
Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,14 @@
1+
use vectorctl::{Cli, Parser, VectorTrait};
2+
13
#[tokio::main]
2-
async fn main() -> Result<(), vectorctl::CliMigrationError> {
3-
vectorctl::run_migrate(qdrant_exemple::Migrator, None).await
4+
async fn main() -> anyhow::Result<()> {
5+
let cli = Cli::parse();
6+
let dataset_url = cli.database_url;
7+
let api_key = cli.api_key;
8+
9+
let context = vectorctl::Context::new(vectorctl::Backend::new(&dataset_url, api_key)?);
10+
11+
vectorctl::run_migrate(qdrant_exemple::Migrator, &context)
12+
.await
13+
.map_err(|err| anyhow::anyhow!(err.to_string()))
414
}

0 commit comments

Comments
 (0)