- Owner on Azure subscription
- Account approved for Azure OpenAI service
- Azure CLI installed
- Azure PowerShell installed
Create a folder to house the repository.
Open a terminal and navigate to the folder.
Clone the repository, then navigate to the Labs/deploy folder within the repository.
git clone https://github.com/AzureCosmosDB/Azure-OpenAI-Python-Developer-Guide.git
cd Azure-OpenAI-Python-Developer-Guide
cd diskann
cd Labs
cd deployOpen the azuredeploy.parameters.json file, and inspect the values, modify as deemed appropriate.
When the Azure Bicep template is deployed, this parameters file will be used to configure the Mongo DB Password and other parameters when provisioning the Azure resources.
Open a terminal window and log in to Azure using the following command:
Connect-AzAccountIf you have more than one subscription associated with your account, set the desired subscription using the following command:
Set-AzContext -SubscriptionId <subscription-id>New-AzResourceGroup -Name cosmos-devguide-rg -Location 'eastus2'Deploy the solution resources using the following command (this will take a few minutes to run):
New-AzResourceGroupDeployment -ResourceGroupName cosmos-devguide-rg -TemplateFile .\azuredeploy.bicep -TemplateParameterFile .\azuredeploy.parameters.json -cEnable Vector Search Feature: This Azure Bicep template will automatically enable the "Vector Search" feature within Azure Cosmos DB for NoSQL.
If it's not enabled, this Azure PowerShell command can be run to enable it on an Azure Cosmos DB for NoSQL Account:
Update-AzCosmosDBAccount -ResourceGroupName <resource-group-name> -Name <account-name> -Capabilities @{name="EnableNoSQLVectorSearch"}