Skip to content

Commit

Permalink
Release: (6941711) Merge branch 'develop' into trunk
Browse files Browse the repository at this point in the history
  • Loading branch information
dkotter committed Aug 6, 2024
1 parent f869f4d commit f17cdb1
Show file tree
Hide file tree
Showing 7 changed files with 45 additions and 35 deletions.
2 changes: 1 addition & 1 deletion classifai.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Plugin URI: https://github.com/10up/classifai
* Update URI: https://classifaiplugin.com
* Description: Enhance your WordPress content with Artificial Intelligence and Machine Learning services.
* Version: 3.1.0
* Version: 3.1.1
* Requires at least: 6.1
* Requires PHP: 7.4
* Author: 10up
Expand Down
2 changes: 1 addition & 1 deletion config.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Global Constants.
*/

$plugin_version = '3.1.0';
$plugin_version = '3.1.1';

// Useful global constants
classifai_define( 'CLASSIFAI_PLUGIN', __DIR__ . '/classifai.php' );
Expand Down
12 changes: 11 additions & 1 deletion includes/Classifai/Providers/Azure/ComputerVision.php
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,16 @@ public function sanitize_settings( array $new_settings ) {

if ( is_wp_error( $auth_check ) ) {
$new_settings[ static::ID ]['authenticated'] = false;

$error_message = $auth_check->get_error_message();

// Add an error message.
add_settings_error(
'api_key',
'classifai-auth',
$error_message,
'error'
);
} else {
$new_settings[ static::ID ]['authenticated'] = true;
}
Expand Down Expand Up @@ -692,7 +702,7 @@ protected function authenticate_credentials( string $url, string $api_key ) {
'Ocp-Apim-Subscription-Key' => $api_key,
'Content-Type' => 'application/json',
],
'body' => '{"url":"https://classifaiplugin.com/wp-content/themes/classifai-theme/assets/img/header.png"}',
'body' => '{"url":"https://classifaiplugin.com/wp-content/themes/fse-classifai-theme/assets/img/header.png"}',
]
);

Expand Down
4 changes: 2 additions & 2 deletions includes/Classifai/Providers/OpenAI/ChatGPT.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@ class ChatGPT extends Provider {
*
* @var string
*/
protected $chatgpt_model = 'gpt-3.5-turbo';
protected $chatgpt_model = 'gpt-4o-mini';

/**
* Maximum number of tokens our model supports
*
* @var int
*/
protected $max_tokens = 16385;
protected $max_tokens = 128000;

/**
* OpenAI ChatGPT constructor.
Expand Down
54 changes: 27 additions & 27 deletions languages/classifai.pot
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
# This file is distributed under the GPLv2.
msgid ""
msgstr ""
"Project-Id-Version: ClassifAI 3.1.0\n"
"Project-Id-Version: ClassifAI 3.1.1\n"
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/classifai\n"
"POT-Creation-Date: 2024-07-15 15:27:24+00:00\n"
"POT-Creation-Date: 2024-08-06 19:04:39+00:00\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
Expand Down Expand Up @@ -75,7 +75,7 @@ msgstr ""
#: includes/Classifai/Admin/BulkActions.php:383
#: includes/Classifai/Admin/BulkActions.php:530
#: includes/Classifai/Features/DescriptiveTextGenerator.php:242
#: includes/Classifai/Providers/Azure/ComputerVision.php:832
#: includes/Classifai/Providers/Azure/ComputerVision.php:842
msgid "Generate descriptive text"
msgstr ""

Expand Down Expand Up @@ -1011,7 +1011,7 @@ msgid "Image tags will be added automatically."
msgstr ""

#: includes/Classifai/Features/ImageTagsGenerator.php:313
#: includes/Classifai/Providers/Azure/ComputerVision.php:838
#: includes/Classifai/Providers/Azure/ComputerVision.php:848
msgid "Tag taxonomy"
msgstr ""

Expand Down Expand Up @@ -1112,7 +1112,7 @@ msgid "Attachment ID to extact text from the PDF file."
msgstr ""

#: includes/Classifai/Features/PDFTextExtraction.php:105
#: includes/Classifai/Providers/Azure/ComputerVision.php:492
#: includes/Classifai/Providers/Azure/ComputerVision.php:502
msgid "PDF Text Extraction is disabled. Please check your settings."
msgstr ""

Expand Down Expand Up @@ -1436,7 +1436,7 @@ msgid "Latest response - Voices"
msgstr ""

#: includes/Classifai/Providers/AWS/AmazonPolly.php:568
#: includes/Classifai/Providers/Azure/ComputerVision.php:249
#: includes/Classifai/Providers/Azure/ComputerVision.php:259
msgid "Nonce could not be verified."
msgstr ""

Expand All @@ -1457,8 +1457,8 @@ msgstr ""

#: includes/Classifai/Providers/Azure/ComputerVision.php:107
#: includes/Classifai/Providers/Azure/ComputerVision.php:132
#: includes/Classifai/Providers/Azure/ComputerVision.php:833
#: includes/Classifai/Providers/Azure/ComputerVision.php:839
#: includes/Classifai/Providers/Azure/ComputerVision.php:843
#: includes/Classifai/Providers/Azure/ComputerVision.php:849
msgid "Confidence threshold"
msgstr ""

Expand All @@ -1474,57 +1474,57 @@ msgid ""
"from 0-100. Recommended to be set to at least 70."
msgstr ""

#: includes/Classifai/Providers/Azure/ComputerVision.php:257
#: includes/Classifai/Providers/Azure/ComputerVision.php:267
msgid "Invalid attachment ID."
msgstr ""

#: includes/Classifai/Providers/Azure/ComputerVision.php:264
#: includes/Classifai/Providers/Azure/ComputerVision.php:274
msgid "Unauthorized access."
msgstr ""

#: includes/Classifai/Providers/Azure/ComputerVision.php:322
#: includes/Classifai/Providers/Azure/ComputerVision.php:376
#: includes/Classifai/Providers/Azure/ComputerVision.php:424
#: includes/Classifai/Providers/Azure/ComputerVision.php:520
#: includes/Classifai/Providers/Azure/ComputerVision.php:332
#: includes/Classifai/Providers/Azure/ComputerVision.php:386
#: includes/Classifai/Providers/Azure/ComputerVision.php:434
#: includes/Classifai/Providers/Azure/ComputerVision.php:530
msgid "This attachment can't be processed."
msgstr ""

#: includes/Classifai/Providers/Azure/ComputerVision.php:329
#: includes/Classifai/Providers/Azure/ComputerVision.php:383
#: includes/Classifai/Providers/Azure/ComputerVision.php:339
#: includes/Classifai/Providers/Azure/ComputerVision.php:393
msgid "Invalid data found. Please check your settings and try again."
msgstr ""

#: includes/Classifai/Providers/Azure/ComputerVision.php:357
#: includes/Classifai/Providers/Azure/ComputerVision.php:367
msgid "Access to the filesystem is required for this feature to work."
msgstr ""

#: includes/Classifai/Providers/Azure/ComputerVision.php:595
#: includes/Classifai/Providers/Azure/ComputerVision.php:605
msgid "Feature not enabled."
msgstr ""

#: includes/Classifai/Providers/Azure/ComputerVision.php:640
#: includes/Classifai/Providers/Azure/ComputerVision.php:644
#: includes/Classifai/Providers/Azure/ComputerVision.php:650
#: includes/Classifai/Providers/Azure/ComputerVision.php:654
msgid "An error occurred."
msgstr ""

#: includes/Classifai/Providers/Azure/ComputerVision.php:723
#: includes/Classifai/Providers/Azure/ComputerVision.php:733
#. translators: %1$s: the attachment ID
msgid "%1$d is not found or is not an attachment"
msgstr ""

#: includes/Classifai/Providers/Azure/ComputerVision.php:733
#: includes/Classifai/Providers/Azure/ComputerVision.php:743
msgid "No valid metadata found."
msgstr ""

#: includes/Classifai/Providers/Azure/ComputerVision.php:760
#: includes/Classifai/Providers/Azure/ComputerVision.php:770
msgid "Valid image size not found. Make sure the image is less than 4MB."
msgstr ""

#: includes/Classifai/Providers/Azure/ComputerVision.php:834
#: includes/Classifai/Providers/Azure/ComputerVision.php:840
#: includes/Classifai/Providers/Azure/ComputerVision.php:844
#: includes/Classifai/Providers/Azure/ComputerVision.php:848
#: includes/Classifai/Providers/Azure/ComputerVision.php:852
#: includes/Classifai/Providers/Azure/ComputerVision.php:850
#: includes/Classifai/Providers/Azure/ComputerVision.php:854
#: includes/Classifai/Providers/Azure/ComputerVision.php:858
#: includes/Classifai/Providers/Azure/ComputerVision.php:862
#: includes/Classifai/Providers/OpenAI/DallE.php:374
msgid "Latest response:"
msgstr ""
Expand Down
2 changes: 1 addition & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Tags: AI, Artificial Intelligence, ML, Machine Learning, Microsoft
Requires at least: 6.1
Tested up to: 6.6
Requires PHP: 7.4
Stable tag: 3.1.0
Stable tag: 3.1.1
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Expand Down
4 changes: 2 additions & 2 deletions vendor/composer/installed.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
'name' => '10up/classifai',
'pretty_version' => 'dev-trunk',
'version' => 'dev-trunk',
'reference' => '9bbea9aa0dacb0bbce2595a6cdb1c4292d8f08ba',
'reference' => '694171169eac28a96141331f76977e0545f27ee9',
'type' => 'wordpress-plugin',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
Expand All @@ -13,7 +13,7 @@
'10up/classifai' => array(
'pretty_version' => 'dev-trunk',
'version' => 'dev-trunk',
'reference' => '9bbea9aa0dacb0bbce2595a6cdb1c4292d8f08ba',
'reference' => '694171169eac28a96141331f76977e0545f27ee9',
'type' => 'wordpress-plugin',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
Expand Down

0 comments on commit f17cdb1

Please sign in to comment.