Qdrant is an open-source vector similarity search engine built for production-ready vector search applications. It provides a convenient API to store, search, and manage vectors with additional payload data.

Portkey provides a proxy to Qdrant - you can log your Qdrant requests and manage auth for Qdrant clusters on Portkey.

Portkey SDK Integration with Qdrant

Portkey provides a consistent API to interact with models from various providers. To integrate Qdrant with Portkey:

1. Install the Portkey SDK

Add the Portkey SDK to your application to interact with Qdrant through Portkey’s gateway.

npm install --save portkey-ai

2. Create a New Integration

To use Qdrant with Portkey, get your API key from Qdrant App, then add it to Portkey to create Qdrant integration.

You will also need your Portkey API Key from Portkey’s Dashboard.

import Portkey from 'portkey-ai'

const portkey = new Portkey({
    apiKey: "PORTKEY_API_KEY", // defaults to process.env["PORTKEY_API_KEY"]
    provider:"@PROVIDER" // Your Qdrant provider slug
})

3. Use the Portkey SDK to interact with Qdrant

from portkey_ai import Portkey

portkey = Portkey(
    api_key="PORTKEY_API_KEY",  # Replace with your Portkey API key
    provider="@QDRANT_PROVIDER",
    custom_host="QDRANT_HOST" # Replace with your Qdrant host
)

response = portkey.post(
    url="https://xxxx-xxx-xxx-xx-xxxxxx.us-west-2-0.aws.cloud.qdrant.io", # Qdrant search endpoint, you can use any Qdrant endpoint
)

print(response)