In order to be able to use OpenAI models on Azure, they first need to be deployed.
Please refer to Azure OpenAI documentation on how to deploy a model on Azure.Once these models are deployed, using Azure OpenAI is easy to do. Just follow these steps -
Set the following environment variables -
Copy
AZURE_OPENAI_API_INSTANCE_NAME=<YOUR_INSTANCE_NAME>AZURE_OPENAI_API_DEPLOYMENT_NAME=<YOUR_DEPLOYMENT_NAME>AZURE_OPENAI_API_VERSION="2024-02-01" #or a newer versionAZURE_OPENAI_API_KEY=<YOUR_KEY>