JavaScript Qdrant REST Client
This repository contains the REST client for the Qdrant vector search engine.
Installation
npm install @qdrant/js-client-rest
# or
yarn add @qdrant/js-client-rest
# or
pnpm i @qdrant/js-client-rest
Usage
Run the Qdrant Docker container:
docker run -p 6333:6333 qdrant/qdrant
Instantiate a client
import {QdrantClient} from '@qdrant/js-client-rest';
const client = new QdrantClient({host: 'localhost', port: 6333});
const client = new QdrantClient({url: 'http://localhost:6333'});
Make requests
Using one of the available facade methods:
try {
const result = await client.getCollections();
console.log('List of collections:', result.collections);
} catch (err) {
console.error('Could not get collections:', err);
}
Or directly using an endpoint from the API:
await client.api('collections').getCollections();