Azure AI API provider

From MoodleDocs

The Moodle integration with Azure AI provides access to AI actions such as generate text, summarise text and explain text.

For more information on Azure AI, see the Azure OpenAI documentation.

Requirements

You need an active Azure account. If you don't have one, you can create it in the Azure portal.

Make sure you have an active subscription to access Azure AI services. Obtain the API key and endpoint from the Azure portal to authenticate your requests. (This is found under the "Keys and Endpoint" section of your resource.)

Azure AI provider instance set-up

To create a provider instance:

  1. Go to Site administration > General > AI providers.
  2. Click 'Create a new provider instance'.
  3. Select Azure AI as AI provider plugin, enter a name and Azure AI API key from your Azure AI account.
  4. Enter the Azure AI API endpoint URL in the format https://YOUR_RESOURCE_NAME.openai.azure.com.
  5. If required, set a site-wide rate limit and/or a user rate limit.
  6. Click 'Create instance'.

To configure the Azure AI provider instance:

  1. Go to Site administration > General > AI providers.
  2. Click the settings link for Azure AI.
  3. Enable/disable actions as required.

For each action, you can customise the model's behaviour via the settings link.

  1. Deployment ID: The unique identifier assigned to a specific model deployment, which you can find in the "Deployments" section of your Azure OpenAI resource in the Azure Portal.
  2. API version: You can find the latest available version under the "API Management" section of your Azure OpenAI resource.
  3. Review and amend the system instruction as necessary.
  4. Save changes.

To enable the Azure AI provider instance:

  1. Go to Site administration > General > AI providers.
  2. Click the toggle to enable the instance.