Skip to content

Commit

Permalink
Updated to make "Advanced Settings: Chat Completions" collapsiable an…
Browse files Browse the repository at this point in the history
…d collapsed by default.
  • Loading branch information
spivurno committed Feb 22, 2024
1 parent 7f16ca2 commit 99ccc6f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion class-gwiz-gf-openai.php
Original file line number Diff line number Diff line change
Expand Up @@ -603,6 +603,7 @@ public function feed_settings_fields() {
),
array(
'title' => 'Advanced Settings: Chat Completions',

Check warning on line 605 in class-gwiz-gf-openai.php

View workflow job for this annotation

GitHub Actions / PHPCS

Array double arrow not aligned correctly; expected 8 space(s) between "'title'" and double arrow, but found 6.
'id' => 'advanced_settings_chat_completions',

Check warning on line 606 in class-gwiz-gf-openai.php

View workflow job for this annotation

GitHub Actions / PHPCS

Array double arrow not aligned correctly; expected 11 space(s) between "'id'" and double arrow, but found 9.
'fields' => array(

Check warning on line 607 in class-gwiz-gf-openai.php

View workflow job for this annotation

GitHub Actions / PHPCS

Array double arrow not aligned correctly; expected 7 space(s) between "'fields'" and double arrow, but found 5.
$this->feed_advanced_setting_timeout( 'chat/completions' ),
$this->feed_advanced_setting_max_tokens( 'chat/completions' ),
Expand All @@ -611,6 +612,8 @@ public function feed_settings_fields() {
$this->feed_advanced_setting_frequency_penalty( 'chat/completions' ),
$this->feed_advanced_setting_presence_penalty( 'chat/completions' ),
),
'collapsible' => true,

Check warning on line 615 in class-gwiz-gf-openai.php

View workflow job for this annotation

GitHub Actions / PHPCS

Array double arrow not aligned correctly; expected 2 space(s) between "'collapsible'" and double arrow, but found 1.
'is_collapsed' => ! isset( $_POST[ 'gform_settings_section_collapsed_advanced_settings_chat_completions' ] ),

Check failure on line 616 in class-gwiz-gf-openai.php

View workflow job for this annotation

GitHub Actions / PHPCS

Array keys must NOT be surrounded by spaces if they only contain a string or an integer.
'dependency' => array(

Check warning on line 617 in class-gwiz-gf-openai.php

View workflow job for this annotation

GitHub Actions / PHPCS

Array double arrow not aligned correctly; expected 3 space(s) between "'dependency'" and double arrow, but found 1.
'live' => true,
'fields' => array(
Expand Down Expand Up @@ -1475,7 +1478,7 @@ public function transform_feed( $feed ) {
array(
'endpoint' => 'chat/completions',
'chat_completions_model' => 'gpt-3.5-turbo',
'chat_completions_message' => $completion_message
'chat_completions_message' => $completion_message

Check failure on line 1481 in class-gwiz-gf-openai.php

View workflow job for this annotation

GitHub Actions / PHPCS

Each array item in a multi-line array declaration must end in a comma
)
);
}
Expand Down

0 comments on commit 99ccc6f

Please sign in to comment.