Setting up Open AI endpoints on Azure for Mayil
Estimated setup time: 20 minutes
Prerequisites
This tutorial assumes you have an Azure account and have installed the Azure CLI app. Follow this tutorial to install the Azure CLI app- here
Your Azure account must have a Cognitive Services Contributor role assigned in order for you to agree to the responsible AI terms and create a resource- Learn More
Provision OpenAI resources on Azure
This tutorial largely follows the steps outlined here
- Login to Azure
- Create a resource group for Mayil
Skip this step if already created during Kubernetes setup.
- Create a Congnitiveservices account specific to Mayil
We have selected the region based on the availability of OpenAI models. See here
- Deploy required models for Mayil
GPT40
Text-embedding-3-large
GPT3
It is critical to set up all the listed models for a fully functioning Mayil. Pricing is based on usage and the number of instances spun up has no effect.
Configuring Mayil’s backend API
Various details generated during the setup process above will need to be copied and provided to Mayil’s backend API as configuration details. Update the JSON block below with all the procured information.
If the variable names provided in the commands in the previous step were used as is, few modifications need to be made to the config.
deployment
- Enter the deployment-name used while creating the service in Azureendpoint
- A link to the resource group we created -https://<resource_group_name>.openai.azure.com/
deployment_type
is always “azure_oai” for Azure OpenAI endpointskey
- AN identifier used by Mayil. Can be one of [“GPT4O”, “EMBEDDING”, “GPT3”]token
- Procure a bearer token by running this command-
After populating the config details, add this config block to ENDPOINTS
as outlined in the Configuration page.
Access Control
It is critical to manage access to these endpoints from a privacy and security point of view. It is strongly recommended that these endpoints be configured to only be accessible from a company-only subnet. Details on how to do this is documented here