MDL-85967 aiprovider_openai: O1 model settings updated

This commit is contained in:
David Woloszyn
2025-07-31 13:08:42 +10:00
parent 56b146f379
commit c4cafb7eb1
2 changed files with 30 additions and 6 deletions
@@ -35,6 +35,36 @@ class o1 extends gpt4o {
return 'O1';
}
#[\Override]
public function get_model_settings(): array {
return [
'top_p' => [
'elementtype' => 'text',
'label' => [
'identifier' => 'settings_top_p',
'component' => 'aiprovider_openai',
],
'type' => PARAM_FLOAT,
'help' => [
'identifier' => 'settings_top_p',
'component' => 'aiprovider_openai',
],
],
'max_completion_tokens' => [
'elementtype' => 'text',
'label' => [
'identifier' => 'settings_max_completion_tokens',
'component' => 'aiprovider_openai',
],
'type' => PARAM_INT,
'help' => [
'identifier' => 'settings_max_completion_tokens',
'component' => 'aiprovider_openai',
],
],
];
}
#[\Override]
public function model_type(): array {
return [self::MODEL_TYPE_TEXT];
-6
View File
@@ -173,21 +173,15 @@ Feature: An administrator can manage AI subsystem settings
| AI model | O1 |
And the field "top_p" matches value ""
And the field "max_completion_tokens" matches value ""
And the field "frequency_penalty" matches value ""
And the field "presence_penalty" matches value ""
# Set model settings for 'O1'.
And I set the following fields to these values:
| top_p | 21 |
| max_completion_tokens | 22 |
| frequency_penalty | 23 |
| presence_penalty | 24 |
And I press "Save changes"
# Go back and check both models have their settings stored.
And I click on the "Settings" link in the table row containing "Generate text"
And the field "top_p" matches value "21"
And the field "max_completion_tokens" matches value "22"
And the field "frequency_penalty" matches value "23"
And the field "presence_penalty" matches value "24"
And I set the following fields to these values:
| AI model | GPT-4o |
And the field "top_p" matches value "11"