Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-83216

AI: Provider ordering

XMLWordPrintable

    • MOODLE_500_STABLE
    • MDL-83216-main
    • Hide

      Prerequisite

      • Set up your OpenAI and Azure credentials to conduct image generation tests.
      • We will execute the below SQL query to validate the data in the database, so please prepare your database IDE or terminal.

        SELECT agi.prompt, ar.actionname, ar.provider
        FROM mdl_ai_action_register ar JOIN mdl_ai_action_generate_image agi ON ar.actionid = agi.id

      Manual Testing

      1. Ordering provider instances

      1. Login as admin
      2. Navigate to Site Admin > General > AI > AI Providers
      3. Create two provider instances for OpenAI with instance name OpenAI1 and OpenAI2. Ensure all the needed configurations are set up correctly and ready to use.
      4. Create one provider instance for Azure with instance name AzureAI. Ensure all the needed configurations are set up correctly and ready to use.
      5. Enable the AzureAI
      6. VERIFY that the order column doesn't show the UP and DOWN arrows.
      7. VERIFY that the AzureAI is at the top of the list.
      8.  Enable the OpenAI1 and OpenAI2.
      9. VERIFY that the order column shows the UP and DOWN arrows.
      10. Use the UP and DOWN arrows. VERIFY that the provider instances are sorted correctly, as expected.
      11. Right-click one of the arrows and open the link in a new tab. VERIFY that the provider instances are sorted correctly, as expected.

      2. Generate image (depends on the first manual testing)

      1. Remove the OpenAI2 provider instance.
      2. Move OpenAI1 to the top of the list and AzureAI at the bottom.
      3. On each provider instance, ensure that the Generate Image action is enabled, set up correctly, and ready to use.
      4. Navigate to Site Admin > General > AI > AI Placements
      5. Enable the Text editor placement
      6. Navigate to the edit profile page
      7. In the description editor, click the AI Generate image button on the toolbar
      8. Describe the image you want the AI to create with: Caffe latte
      9. Click the Generate image button.
      10. VERIFY the generated image is visible
      11. Run the query in the Prerequisite. VERIFY for the Caffe latte prompt; the provider is OpenAI API Provider.
      12. Navigate to Site Admin > General > AI > AI Providers
      13. Move OpenAI1 to the bottom of the list and AzureAI at the top.
      14. Navigate to the edit profile page
      15. In the description editor, click the AI Generate image button on the toolbar
      16. Describe the image you want the AI to create with: American espresso
      17. Click the Generate image button.
      18. VERIFY the generated image is visible
      19. Run the query in the Prerequisite. VERIFY for the American espresso prompt; the provider is Azure AI API Provider.
      Show
      Prerequisite Set up your OpenAI and Azure credentials to conduct image generation tests. We will execute the below SQL query to validate the data in the database, so please prepare your database IDE or terminal. SELECT agi.prompt, ar.actionname, ar.provider FROM mdl_ai_action_register ar JOIN mdl_ai_action_generate_image agi ON ar.actionid = agi.id Manual Testing 1. Ordering provider instances Login as admin Navigate to Site Admin > General > AI > AI Providers Create two provider instances for OpenAI with instance name OpenAI1 and OpenAI2. Ensure all the needed configurations are set up correctly and ready to use. Create one provider instance for Azure with instance name AzureAI. Ensure all the needed configurations are set up correctly and ready to use. Enable the AzureAI VERIFY that the order column doesn't show the UP and DOWN arrows. VERIFY that the AzureAI is at the top of the list.  Enable the  OpenAI1 and OpenAI2. VERIFY that the order column shows the UP and DOWN arrows. Use the UP and DOWN arrows. VERIFY that the provider instances are sorted correctly, as expected. Right-click one of the arrows and open the link in a new tab.  VERIFY that the provider instances are sorted correctly, as expected. 2. Generate image (depends on the first manual testing) Remove the OpenAI2 provider instance. Move OpenAI1 to the top of the list and AzureAI at the bottom. On each provider instance, ensure that the Generate Image action is enabled, set up correctly, and ready to use. Navigate to Site Admin > General > AI > AI Placements Enable the Text editor placement Navigate to the edit profile page In the description editor, click the AI Generate image button on the toolbar Describe the image you want the AI to create with: Caffe latte Click the Generate image button. VERIFY the generated image is visible Run the query in the Prerequisite. VERIFY for the Caffe latte prompt; the provider is OpenAI API Provider . Navigate to Site Admin > General > AI > AI Providers Move OpenAI1 to the bottom of the list and AzureAI at the top. Navigate to the edit profile page In the description editor, click the AI Generate image button on the toolbar Describe the image you want the AI to create with: American espresso Click the Generate image button. VERIFY the generated image is visible Run the query in the Prerequisite. VERIFY for the American espresso prompt; the provider is Azure AI API Provider .
    • Hide

      Code verified against automated checks.

      Checked MDL-83216 using repository: https://github.com/meirzamoodle/moodle.git

      More information about this report

      Built on: Wed Feb 26 01:56:36 AM UTC 2025

      Show
      Code verified against automated checks. Checked MDL-83216 using repository: https://github.com/meirzamoodle/moodle.git main (0 errors / 0 warnings) [branch: MDL-83216-main | CI Job ] More information about this report Built on: Wed Feb 26 01:56:36 AM UTC 2025
    • Show
      Launching automatic jobs for branch MDL-83216 -main https://ci.moodle.org/view/Testing/job/DEV.02%20-%20Developer-requested%20PHPUnit/18357/ PHPUnit (sqlsrv / complete) https://ci.moodle.org/view/Testing/job/DEV.01%20-%20Developer-requested%20Behat/62825/ Behat (NonJS - boost and classic / complete) https://ci.moodle.org/view/Testing/job/DEV.01%20-%20Developer-requested%20Behat/62826/ Behat (Firefox - boost / complete) https://ci.moodle.org/view/Testing/job/DEV.01%20-%20Developer-requested%20Behat/62827/ Behat (Firefox - classic / complete) https://ci.moodle.org/view/Testing/job/DEV.01%20-%20Developer-requested%20Behat/62828/ App tests (stable app version) / complete) Built on: Wed Feb 26 06:16:06 AM UTC 2025
    • 6
    • Team Dragons 2025 Sprint 1.2

      Add the ability for Administrators to order AI provider plugins, via the admin settings.

      Have the AI subsystem manager call providers in the order listed in the admin settings.

      Currently the manager tries to find a provider to process an action in the default alphabetical order of the plugins. Being able to set the order will allow admins to set a preference for action processing. Providers higher in the list will be processed before providers lower in the list. This will work in a similar way to the existing functionality for media players.

      The provider management table will need to be updated to add support for sorting plugins. Order will need to be stored.

       

      Media Player Settings

            meirza.arson@moodle.com Meirza
            matt.porritt@moodle.com Matt Porritt
            Huong Nguyen Huong Nguyen
            Jun Pataleta Jun Pataleta
            Mikel Martín Corrales Mikel Martín Corrales
            Votes:
            2 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 week, 2 days, 59 minutes
                1w 2d 59m

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.