qdrant-client 0.1.0

Rust client for Qdrant Vector Search Engine
docs.rs failed to build qdrant-client-0.1.0
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build: qdrant-client-1.16.0

rust-client

Rust client for Qdrant vector search engine

Installation

cargo add qdrant-client

Usage

Run Qdrant with enabled gRPC interface:

# With env variable
docker run -p 6333:6333 -p 6334:6334 \
    -e QDRANT__SERVICE__GRPC_PORT="6334" \
    qdrant/qdrant

Or by updating the configuration file:

service:
  grpc_port: 6334

More info about gRPC in documentation.

Making requests

use tonic::transport::Channel;


let uri = "http://localhost:6334".parse().unwrap();
let endpoint = Channel::builder(uri)
    .timeout(Duration::from_secs(5))
    .connect_timeout(Duration::from_secs(5))
    .keep_alive_while_idle(true);

// `connect` is using the `Reconnect` network service internally to handle dropped connections
let channel = endpoint.connect().await.unwrap(); // Unwrap in test only

let mut client = QdrantClient::new(channel);
let collections_list = client.collection_api.list(ListCollectionsRequest {}).await.unwrap();