AI providers

From MoodleDocs


Moodle's AI subsystem allows integration with various AI providers through their APIs, enabling a range of AI-powered functionalities for your site. These providers offer actions such as text generation, course content summarisation, and image generation, which can enhance user interaction and content creation.

Provider instances

New feature
in Moodle 5.0!
In Moodle 5.0 onwards, you can create customisable provider instances for specific tasks. For example, you can use a more efficient model for lightweight tasks like summarisation, and a more fully featured model for text generation. Another example is defaulting to using a cheaper model with a lower token limit, and then falling back to a more expensive model if a request is too large for the default model.

To create a provider instance:

  1. Go to Site administration > General > AI providers.
  2. Click 'Create a new provider instance'.
  3. Choose an AI provider plugin, enter credentials for it then click 'Create instance'.

From Site administration > General > AI providers you can adjust the action settings for the provider instance and enable it when it is ready for use.

New feature
in Moodle 5.0!
When multiple provider instances are enabled, you can define the order for action processing.

Provider plugins

OpenAI API

The OpenAI API provider enables integration with the services of OpenAI. To configure this provider, you need an OpenAI account and subscribe to a paid API plan.

Azure AI

The Azure AI API provider connects Moodle with the services of Microsoft's Azure AI. To configure this provider, you need an Azure account and API access, with different service levels available depending on the chosen Azure subscription.

Ollama API

New feature
in Moodle 5.0!
The Ollama API provider is available in Moodle 5.0 onwards. To configure this provider, you need to download and install Ollama on a server.

Other providers

Other LLM providers, both open-source and commercial, as well as tools like AI proxies or routers, offer an OpenAI API-compatible layer for accessing their services.