This guide assumes you already have an Azure subscription and have access to the Azure portal.
Having created a training-specific resource group, we are now ready to deploy the Azure OpenAI resource within it. P lease follow these steps:
- Navigate to the Azure portal.
- Use the search bar to locate and select the
Azure OpenAI
service. - Click on the
+ Create
button. - On the
Basics
tab, provide the following information:- Subscription: Your subscription name
- Resource group: The name of your resource group
- Region: The region where you wish to deploy the resource (e.g.,
West Europe
) - Name: The name for your Azure OpenAI service, which must be globally unique. Choose a unique name.
- Pricing tier: The
Standard S0
tier should suffice. Click "Next."
- On the
Network
tab, enter the following:- Type: Select if all networks, including the internet, can access this resource. Click "Next."
- You may bypass the section requesting tags.
- Proceed to the
Review + create
tab and click theCreate
button.
The deployment will take a few minutes, after which your Azure OpenAI resource will be ready for use.
From now on, it should appear in the list of Azure OpenAI
resources.
By default, the Azure OpenAI resource does not expose any models. You must select and deploy the models you wish to use. Follow these steps to do so:
- Use the search bar to find and select the
Azure OpenAI
service. - You will be presented with an overview of all your deployed
Azure OpenAI
resources. Click on the resource you recently created. - Access the Azure OpenAI Studio by clicking the
Go to OpenAI Studio
button. - Navigate to the Deployments page by selecting
Management > Deployments
from the left-hand menu. - Click on the
+ Create new deployment
button. - As of this writing, the recommended model for deployment is the
gpt-3.5-turbo-16k
.
To make API calls to the Azure OpenAI resource, you need to obtain an API key and url. You can do this by taking the following steps:
- In the search bar, search for and click on the
Azure OpenAI
service. - You should now see an overview of all the deployed
Azure OpenAI
resources. Click on the resource you just created. - Go to the Azure OpenAI Studio by clicking on the
Go to OpenAI Studio
button. (Sometimes you can go there directly by going to oai.azure.com.) - Make sure you are in your Azure OpenAI instance by checking the name in top right corner.
- Go to the chat playground by clicking on the
Playground > Chat
button in the left menu. - Select one of your chat models in the dropdown menu on the right-hand side configuration menu.
- Click on the
View Code
button. - This will open a modal with the url endpoint and API key. Copy these values and store them securely.
- Open the Obsidian vault where this plugin is installed.
- Access the settings for this plugin.
- In the API Provider setting, choose
Azure OAI API
to update the API settings view. - Paste the API key you copied earlier into the
Azure API key
field. - Confirm that the
Azure OAI API URL
field is set to URL you copied earlier. This should be something likehttps://YOUR_AOI_SERVICE_NAME.openai.azure.com/openai/deployments/YOUR_MODEL_DEPLOyMENT_NAME/chat/completions?api-version=2023-07-01-preview
. - Test the connection by clicking the
Test Connection
button to ensure the API key is correct and the plugin can connect to the OpenAI API. - Exit the settings window.
- The plugin is now ready for use. Begin typing, and upon reaching a trigger, such as the end of a sentence, the plugin will offer suggestions. Or manually trigger the plugin by opening the command palette and typing
Copilot auto completion: Predict
.