MDL-85967 aiprovider_openai: O1 model settings updated
This commit is contained in:
@@ -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];
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user