Documentation Index
Fetch the complete documentation index at: https://docs.obiguard.ai/llms.txt
Use this file to discover all available pages before exploring further.
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.
Obiguard provides a proxy to Qdrant, allowing you to use virtual keys and observability features.
Obiguard SDK Integration with Qdrant
Obiguard provides a consistent API to interact with models from various providers. To integrate Qdrant with Obiguard:
1. Install the Obiguard SDK
Add the Obiguard SDK to your application to interact with Qdrant through Obiguard’s gateway.
2. Initialize Obiguard with a Virtual Key
To use Qdrant with Obiguard, get your API key from Qdrant App, then add it to Obiguard to create your
Qdrant virtual key.
Python SDK
OpenAI Python SDK
from obiguard import Obiguard
client = Obiguard(
obiguard_api_key="vk-obg***", # Your Obiguard virtual key
)
from openai import OpenAI
from obiguard import OBIGUARD_GATEWAY_URL, createHeaders
client = OpenAI(
api_key="QDRANT_API_KEY",
base_url=OBIGUARD_GATEWAY_URL,
default_headers=createHeaders(
obiguard_api_key="vk-obg***", # Your Obiguard virtual key
provider="qdrant",
custom_host="QDRANT_HOST" # Replace with your Qdrant host
)
)
3. Use the Obiguard SDK to interact with Qdrant
Python SDK
OpenAI Python
cURL
from obiguard import Obiguard
client = Obiguard(
obiguard_api_key="vk-obg***", # Your Obiguard virtual key
custom_host="QDRANT_HOST" # Replace with your Qdrant host
)
response = client.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)
from openai import OpenAI
from obiguard import OBIGUARD_GATEWAY_URL, createHeaders
openai = OpenAI(
api_key='QDRANT_API_KEY',
base_url=OBIGUARD_GATEWAY_URL,
default_headers=createHeaders(
provider="qdrant",
obiguard_api_key="vk-obg***", # Your Obiguard virtual key
custom_host="QDRANT_HOST" # Replace with your Qdrant host
)
)
response = openai.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)
curl --location --request POST 'https://xxxx-xxx-xxx-xx-xxxxxx.us-west-2-0.aws.cloud.qdrant.io' \
-H 'x-obiguard-custom-host: $QDRANT_HOST' \
-H "x-obiguard-api-key: $OBIGUARD_API_KEY" \