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.
from obiguard import Obiguardclient = 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)
Copy
from obiguard import Obiguardclient = 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)
Copy
from openai import OpenAIfrom obiguard import OBIGUARD_GATEWAY_URL, createHeadersopenai = OpenAI( api_key='MILVUS_API_KEY', base_url=OBIGUARD_GATEWAY_URL, default_headers=createHeaders( provider="milvus", 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 = openai.post( url="v2/vectordb/collections/list", # Replace with the endpoint you want to call)print(response)