Skip to content

code-fabrik/qdrant-laravel

Repository files navigation

Qdrant Laravel

Installation

Install the package via Composer:

composer require codefabrik/qdrant-laravel

Publish the configuration file:

php artisan vendor:publish --tag="qdrant-laravel-config"

Usage

Configure the client in the .env file:

QDRANT_HOST=https://localhost
QDRANT_PORT=6333
QDRANT_COLLECTION=publicsearch

Create a client:

$qdrant = new QdrantClient();

Run actions:

$qdrant->collection()->create(1024, 'Cosine');

Methods

Check if the collection already exists

$qdrant->collection()->exists()

Create the collection

$qdrant->collection()->create(int $vectorSize, string $distanceMetric)
  • vectorSize: the length of the vectors to store, e.g. 1024
  • distanceMetric: the method for distance calculation, e.g. Cosine

Development

Testing

./vendor/bin/pest

Linting

./vendor/bin/pint

Static Code Analysis

./vendor/bin/phpstan analyse

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published