Milvus is an open-source vector database built for GenAI applications. It is built to be performant and scale to tens of billions of vectors with minimal performance loss.

Obiguard provides a proxy to Milvus, allowing you to use virtual keys and observability features.

Obiguard SDK Integration with Milvus

Obiguard provides a consistent API to interact with models from various providers. To integrate Milvus with Obiguard:

1. Install the Obiguard SDK

Add the Obiguard SDK to your application to interact with Milvus through Obiguard’s gateway.

pip install obiguard

2. Initialize Obiguard with a Virtual Key

To use Milvus with Obiguard, get your Milvus API key from here, then add it to Obiguard to create your Milvus virtual key.

from obiguard import Obiguard

client = Obiguard(
  obiguard_api_key="vk-obg***",  # Your Obiguard virtual key
)

3. Use the Obiguard SDK to interact with Milvus

from obiguard import Obiguard

client = Obiguard(
  obiguard_api_key="vk-obg***",  # Your Obiguard virtual key
  custom_host="MILVUS_HOST" # Replace with your Milvus host example: https://in03-34d7b37f7ee12c7.serverless.gcp-us-west1.cloud.zilliz.com
)

response = client.post(
  url="v2/vectordb/collections/list", # Replace with the endpoint you want to call
)

print(response)