Download the PHP package gregpriday/laravel-scout-qdrant without Composer

On this page you can find all versions of the php package gregpriday/laravel-scout-qdrant. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-scout-qdrant

Laravel Scout Qdrant Drivers

The Laravel Scout Qdrant Drivers package introduces vector search capabilities within Laravel applications by leveraging Scout, Qdrant, and OpenAI. This package transforms your application's data into vectors using OpenAI, then indexes and makes them searchable using Qdrant, a powerful vector database management system.

Note: This package is a work in progress and might not be ready for production use yet. However, with growing interest and support, the plan is to expand and improve it continually.

Prerequisites

Follow the instructions on the OpenAI for Laravel page to configure OpenAI variables.

Installation

Install the package via Composer:

Add migrations with:

Publish the configuration file with:

Configuration

After installation, you should configure the qdrant settings in your config/scout-qdrant.php file:

The QDRANT_HOST key defines the location of your Qdrant service. If you are using Qdrant Cloud or a Docker container on a different server, update this value accordingly. The QDRANT_API_KEY key is for specifying your Qdrant API key if necessary.

The QDRANT_STORAGE key indicates the location where Qdrant will store its files. By default, this is set to database/qdrant, but you can specify a different location depending on your setup.

The QDRANT_VECTORIZER key is used to define the vectorizer to be used. By default, it's set to 'openai'. If you have a custom vectorizer, you can specify it here.

For more details on configuring Qdrant, please refer to the Qdrant documentation.

Additionally, ensure Scout is configured to use the qdrant driver by setting the SCOUT_DRIVER in your .env file:

Your model should also include a toSearchableArray method that includes a vector key. This key gets converted into a vector using OpenAI:

Usage

You can use the package just as you would use Laravel Scout, but with the added advantage of vector-based searches. This functionality offers more precise and complex search results.

For additional instructions on usage, please visit the Laravel Scout documentation.

Qdrant Docker Management Commands

Manage your Qdrant Docker container with the following commands:

Install Qdrant

This command pulls the Qdrant Docker image and checks whether Docker is installed on your machine. If it's not, the command provides instructions on installation.

Start Qdrant

Starts your Qdrant Docker container with the default port set to 6333, storage path as database/qdrant, and restart policy as unless-stopped. You can specify a different port, storage path or restart policy with the --port, --storage, and --restart options, respectively:

Restart Qdrant

Restarts your Qdrant Docker container. This command accepts the --port, --storage, and --restart options.

Check Qdrant Status

Provides the status of your Qdrant Docker container, including details like container ID, image, command, creation time, status, ports, and name.

Stop Qdrant

Stops your Qdrant Docker container. Use --kill to kill the container instead of stopping it.

Creating a Custom Vectorizer

To create a custom vectorizer, ensure you have a custom model or a third-party service. Then, create a new class that implements GregPriday\ScoutQdrant\Vectorizer. This interface requires a single method: vectorize(string $text): array.

Example:

Specify your custom vectorizer in your scout-qdrant.php configuration file:

Now your custom vectorizer will be used to create vectors for your Scout records.

Testing

Start Qdrant for testing with:

`

Execute tests with:

Changelog

Visit the CHANGELOG for updates and changes.

Contributing

Guidelines for contributing can be found in the CONTRIBUTING file.

Security Vulnerabilities

If you discover a security vulnerability, please follow our security policy to report it.

Credits

License

The Laravel Scout Qdrant Drivers is open-source software licensed under the MIT license.


All versions of laravel-scout-qdrant with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
guzzlehttp/guzzle Version ^7.7
hkulekci/qdrant Version ^0.1.0
illuminate/contracts Version ^10.0
laravel/scout Version ^10.2
openai-php/laravel Version ^0.5.0
spatie/laravel-package-tools Version ^1.14.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package gregpriday/laravel-scout-qdrant contains the following files

Loading the files please wait ....