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

AI: Per Model settings

XMLWordPrintable

    • MOODLE_500_STABLE
    • MDL-82980-main
    • Hide

      Cover by newly created PHPUnit. Manual testing is below

      1. Login as admin.
      2. Create or use existing OpenAI Provider instance.
      3. Click on the Settings link for the created instance.
      4. Click on the Settings link for action Generate text.
      5. Verify that you will see two sections: General and Settings.
      6. Verify that the AI model is a combo box.
      7. Verify that AI model values are: Custom, GPT-4o and O1.
      8. Select GPT4-o.
      9. Verify that you will see the below fields in the Model section:
        • top_p
        • max_tokens
        • frequency_penalty
        • presence_penalty
      10. Select Custom.
      11. Verify that you will see the Custom model name field.
      12. Verify that you will see the Extra parameters text area.
      13. Input below to the Extra parameters field.

        {
            "temperature": 0.5,
            "max_tokens": abc
        } 

      14. Verify that you will see an error: Invalid JSON string
      15. Input below to the Extra parameters field.

        {
            "temperature": 0.5,
            "max_tokens": 100
        } 

      16. Verify that you can save the form.
      17. Click on the Settings link for action Generate image.
      18. Verify that the AI model is a combo box.
      19. Verify that AI model values are: Custom and DALL-e-3.
      20. Select Custom.
      21. Verify that you will see the Custom model name field.
      22. Verify that you will see the Extra parameters text area.
      23. Empty the Custom model name.
      24. Press Save changes.
      25. Verify that you see an error: Required in the Custom model name.
      26. Set the Custom model name to: my-custom-gpt.
      27. Press Save changes.
      28. Verify that you can save the form.
      Show
      Cover by newly created PHPUnit. Manual testing is below Login as admin. Create or use existing OpenAI Provider instance. Click on the Settings link for the created instance. Click on the Settings link for action Generate text . Verify that you will see two sections: General and Settings. Verify that the AI model is a combo box. Verify that AI model values are: Custom, GPT-4o and O1. Select GPT4-o. Verify that you will see the below fields in the Model section: top_p max_tokens frequency_penalty presence_penalty Select Custom. Verify that you will see the Custom model name field. Verify that you will see the Extra parameters text area. Input below to the Extra parameters field. {     "temperature" : 0.5 ,     "max_tokens" : abc } Verify that you will see an error: Invalid JSON string Input below to the Extra parameters field. { "temperature" : 0.5 , "max_tokens" : 100 } Verify that you can save the form. Click on the Settings link for action Generate image . Verify that the AI model is a combo box. Verify that AI model values are: Custom and DALL-e-3. Select Custom. Verify that you will see the Custom model name field. Verify that you will see the Extra parameters text area. Empty the Custom model name. Press Save changes. Verify that you see an error: Required in the Custom model name. Set the Custom model name to: my-custom-gpt. Press Save changes. Verify that you can save the form.
    • Hide

      Code verified against automated checks.

      Checked MDL-82980 using repository: https://github.com/HuongNV13/moodle.git

      More information about this report

      Built on: Tue Jan 28 06:15:02 AM UTC 2025

      Show
      Code verified against automated checks. Checked MDL-82980 using repository: https://github.com/HuongNV13/moodle.git main (0 errors / 0 warnings) [branch: MDL-82980-main | CI Job ] More information about this report Built on: Tue Jan 28 06:15:02 AM UTC 2025
    • Show
      Launching automatic jobs for branch MDL-82980 -main https://ci.moodle.org/view/Testing/job/DEV.02%20-%20Developer-requested%20PHPUnit/18302/ PHPUnit (sqlsrv / complete) https://ci.moodle.org/view/Testing/job/DEV.01%20-%20Developer-requested%20Behat/62582/ Behat (NonJS - boost and classic / complete) https://ci.moodle.org/view/Testing/job/DEV.01%20-%20Developer-requested%20Behat/62583/ Behat (Firefox - boost / complete) https://ci.moodle.org/view/Testing/job/DEV.01%20-%20Developer-requested%20Behat/62584/ Behat (Firefox - classic / complete) https://ci.moodle.org/view/Testing/job/DEV.01%20-%20Developer-requested%20Behat/62585/ App tests (stable app version) / complete) Built on: Wed Feb 19 02:18:50 PM UTC 2025
    • 6
    • Team Hedgehog 2024 Sprint 4.3, Team Hedgehog 2025 Sprint 1.0, Team Hedgehogs 2025 Sprint 1.1, Team Hedgehogs 2025 Sprint 1.2

      Improve per action provider settings for model specific configuration.

      Most AI models support settings like "top_p" and other settings that tune the models behaviour. While there are some of these settings in common across models, not every model supports every option.

      Per action settings were introduced by MDL-82609. These should be extended so that when a model is selected (for predefined model options), that a provider can load options specific for that model. This would operate in a similar fashion as MDL-81732 works for SMS gateways.

      For models that are not predefined and can be entered directly by an admin, there will need to be provision to allow the admin to enter key-value pairs of options.

        1. (1) 12 Passed -- (Main)MDL-82980.png
          83 kB
          Kim Jared Lucas
        2. (1) 14 Passed -- (Main)MDL-82980.png
          87 kB
          Kim Jared Lucas
        3. (1) 16 Passed -- (Main)MDL-82980.png
          51 kB
          Kim Jared Lucas
        4. (1) 19 Passed -- (Main)MDL-82980.png
          57 kB
          Kim Jared Lucas
        5. (1) 22 Passed -- (Main)MDL-82980.png
          74 kB
          Kim Jared Lucas
        6. (1) 25 Passed -- (Main)MDL-82980.png
          44 kB
          Kim Jared Lucas
        7. (1) 28 Passed -- (Main)MDL-82980.png
          50 kB
          Kim Jared Lucas
        8. (1) 7 Passed -- (Main)MDL-82980.png
          93 kB
          Kim Jared Lucas
        9. (1) 9 Passed -- (Main)MDL-82980.png
          80 kB
          Kim Jared Lucas
        10. ai_model_select.png
          21 kB
          Marcus Green
        11. custom_model.png
          48 kB
          Matt Porritt
        12. image-2025-01-15-14-08-22-787.png
          344 kB
          Huong Nguyen
        13. image-2025-01-15-14-08-44-078.png
          131 kB
          Huong Nguyen

            huongn@moodle.com Huong Nguyen
            matt.porritt@moodle.com Matt Porritt
            Meirza Meirza
            Shamim Rezaie Shamim Rezaie
            Kim Jared Lucas Kim Jared Lucas
            Votes:
            3 Vote for this issue
            Watchers:
            14 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 weeks, 4 days, 4 hours, 11 minutes
                2w 4d 4h 11m

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