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

AI: Add model information to registration data

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Minor Minor
    • 5.0
    • Future Dev
    • AI
    • MOODLE_500_STABLE
    • MDL-83154-main
    • Hide

      Setup and populate data

      1. Install a fresh instance of Moodle using this patch
      2. Make your site publicly accessible using Ngrok or similar.
      3. Log in as admin
      4. Go to Site admin -> General -> Registration
      5. Register your site
      6. Go to Site admin -> General -> AI -> Manage settings for AI Providers
      7. Setup OpenAI and Azure AI using valid credentials (reach out if you need assistance).
      8. Ensure the each providers has all its actions enabled too.
      9. For now, ONLY enable OpenAI provider.
      10. Go to Site admin -> General -> AI -> Manage settings for AI placements
      11. Ensure all placements are enabled.
      12. Create a course and add a 'Page' resource
      13. On the 'Page' resource settings page, scroll to an editor.
      14. Click on 'AI generate image' and prompt it to generate anything
      15. Click cancel (we don't need the image).
      16. Click on 'AI generate text' and prompt it to generate something with at least a paragraphs worth of text.
      17. Click 'Insert'.
      18. Scroll down and click 'Save and display'
      19. Click on the 'Summarise' button.
      20. Go to Site admin -> General -> AI -> Manage settings for AI Providers
      21. Enable 'Azure AI' and disable 'OpenAI'
      22. Repeat these steps #10-17 to generate some AI content using Azure AI.

      Test DB data

      1. Use a database program of your choosing
      2. Locate the mdl_ai_action_register table
      3. CONFIRM there is a new field called 'model'

      Test registration data

      1. Go to Site admin -> General -> Registration
      2. Update your site registration*
      3. Contact someone from the Moodle sites team and ask them to provide your site registration data (Mary should be able to help you out)
      4. CONFIRM that in the 'aiusage' property contains the model and the count data.

      When registering your site for the first time we use GET. If we had any AI usage data, it would not have been included due to the character restriction. When *updating your registration, we are using POST and will not have the restriction. All data will be sent through.

      Test upgrade new fields

      1. Using another existing Moodle instance, apply this patch
      2. Go through the upgrade process
      3. CONFIRM the new database field 'model' exists in the mdl_ai_action_register table
      Show
      Setup and populate data Install a fresh instance of Moodle using this patch Make your site publicly accessible using Ngrok or similar. Log in as admin Go to Site admin -> General -> Registration Register your site Go to Site admin -> General -> AI -> Manage settings for AI Providers Setup OpenAI and Azure AI using valid credentials (reach out if you need assistance). Ensure the each providers has all its actions enabled too. For now, ONLY enable OpenAI provider. Go to Site admin -> General -> AI -> Manage settings for AI placements Ensure all placements are enabled. Create a course and add a 'Page' resource On the 'Page' resource settings page, scroll to an editor. Click on 'AI generate image' and prompt it to generate anything Click cancel (we don't need the image). Click on 'AI generate text' and prompt it to generate something with at least a paragraphs worth of text. Click 'Insert'. Scroll down and click 'Save and display' Click on the 'Summarise' button. Go to Site admin -> General -> AI -> Manage settings for AI Providers Enable 'Azure AI' and disable 'OpenAI' Repeat these steps #10-17 to generate some AI content using Azure AI. Test DB data Use a database program of your choosing Locate the mdl_ai_action_register  table CONFIRM there is a new field called 'model' Test registration data Go to Site admin -> General -> Registration Update your site registration* Contact someone from the Moodle sites team and ask them to provide your site registration data (Mary should be able to help you out) CONFIRM that in the 'aiusage' property contains the model and the count data. When registering your site for the first time we use GET. If we had any AI usage data, it would not have been included due to the character restriction. When *updating your registration, we are using POST and will not have the restriction. All data will be sent through. Test upgrade new fields Using another existing Moodle instance, apply this patch Go through the upgrade process CONFIRM the new database field 'model' exists in the mdl_ai_action_register table
    • Hide

      Code verified against automated checks with warnings.

      Checked MDL-83154 using repository: https://github.com/davewoloszyn/moodle.git

      Should these errors be fixed?

      Built on: Fri 01 Nov 2024 12:07:23 AM UTC

      Show
      Code verified against automated checks with warnings. Checked MDL-83154 using repository: https://github.com/davewoloszyn/moodle.git main (0 errors / 3 warnings) [branch: MDL-83154-main | CI Job ] overview (0/0) , phplint (0/0) , phpcs (0/0) , js (0/0) , css (0/0) , phpdoc (0/0) , commit (0/0) , savepoint (0/0) , thirdparty (0/0) , externalbackup (0/3) , grunt (0/0) , shifter (0/0) , mustache (0/0) , gherkin (0/0) , Should these errors be fixed? Built on: Fri 01 Nov 2024 12:07:23 AM UTC
    • Show
      Launching automatic jobs for branch MDL-83154 -main https://ci.moodle.org/view/Testing/job/DEV.02%20-%20Developer-requested%20PHPUnit/17168/ PHPUnit (sqlsrv / complete) https://ci.moodle.org/view/Testing/job/DEV.01%20-%20Developer-requested%20Behat/58429/ Behat (NonJS - boost and classic / complete) https://ci.moodle.org/view/Testing/job/DEV.01%20-%20Developer-requested%20Behat/58430/ Behat (Firefox - boost / complete) https://ci.moodle.org/view/Testing/job/DEV.01%20-%20Developer-requested%20Behat/58431/ Behat (Firefox - classic / complete) https://ci.moodle.org/view/Testing/job/DEV.01%20-%20Developer-requested%20Behat/58432/ App tests (stable app version) / complete) Built on: Tue Oct 29 10:30:04 UTC 2024
    • 2
    • Team Hedgehog 2024 Sprint 3.3, Team Hedgehog 2024 Review 4, Team Hedgehog 2024 Sprint 4.1

      Improve the site registration data capture to include the model used in the actions.

      Currently only the name of the provider is captured, however with the addition of MDL-82609 each provider can support multiple models.

      Adding this data will also help admins and other users report on functionality within LMS

      The action database tables will also need to be upgraded to store the model data.

      Proposed data structure for model info:

       

      {
         "Azure":{
            "generate_text":{
               "success_count":3,
               "fail_count":1,
               "predominant_error":403,
               "average_time":2,
               "models" {
                   [
                    {
                     "name": "gpt-4o",
                     "count": 4
                    }
                   ],
                   [
                    {
                     "name": "llama-3",
                     "count": 5
                    }
                   ]
                 }
       
            },
            "generate_image":{
               "success_count":1,
               "fail_count":1,
               "predominant_error":403,
               "average_time":20
            }
         },
         "time_range":{
            "timefrom":1723001586,
            "timeto":1723606386
         }
      } 

       

       

       

            david.woloszyn@moodle.com David Woloszyn
            matt.porritt@moodle.com Matt Porritt
            Raquel Ortega Raquel Ortega
            Jun Pataleta Jun Pataleta
            Kim Jared Lucas Kim Jared Lucas
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 3 days, 4 hours, 16 minutes
                3d 4h 16m

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