Skip to content

Commit e36af14

Browse files
committed
add docs for qdrand cloud
1 parent 86d1dff commit e36af14

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,3 +158,26 @@ Or run the example from this project directly:
158158
```bash
159159
cargo run --example search
160160
```
161+
162+
## Qdrant Cloud
163+
164+
[Qdrant Cloud](https://cloud.qdrant.io) is a managed service for Qdrant.
165+
166+
The client needs to be configured properly to access the service.
167+
168+
- make sure to use the correct port (6334)
169+
- make sure to pass your API KEY
170+
171+
```rust
172+
async fn make_client() -> Result<QdrantClient> {
173+
let config = QdrantClientConfig::from_url("http://xxxxxxxxxx.eu-central.aws.cloud.qdrant.io:6334");
174+
// using an env variable for the API KEY for example
175+
let api_key = std::env::var("QDRANT_API_KEY").ok();
176+
177+
if let Some(api_key) = api_key {
178+
config.set_api_key(&api_key);
179+
}
180+
let client = QdrantClient::new(Some(config)).await?;
181+
Ok(client)
182+
}
183+
```

0 commit comments

Comments
 (0)