diff --git a/CHANGELOG.md b/CHANGELOG.md index b974b71c2..fed87efde 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,17 @@ All notable changes to this project will be documented in this file, per [the Ke ## [Unreleased] - TBD +## [3.1.1] - 2024-08-06 + +### Changed + +- Switch from using the `gpt-3.5-turbo` model to the new `gpt-4o-mini` model for any OpenAI text generation requests. Increase our context window from 16,385 tokens to 128,000 tokens (props [@dkotter](https://github.com/dkotter), [@iamdharmesh](https://github.com/iamdharmesh) via [#785](https://github.com/10up/classifai/pull/785)). + +### Fixed + +- Update a image URLs that no longer exist, fixing an issue with authentication in the Azure AI Vision Provider (props [@faisal-alvi](https://github.com/faisal-alvi), [@jamespstyles](https://github.com/jamespstyles), [@dkotter](https://github.com/dkotter) via [#787](https://github.com/10up/classifai/pull/787)). +- Ensure we show a proper error notice if the Azure AI Vision Provider fails to authenticate (props [@faisal-alvi](https://github.com/faisal-alvi), [@jamespstyles](https://github.com/jamespstyles), [@dkotter](https://github.com/dkotter) via [#787](https://github.com/10up/classifai/pull/787)). + ## [3.1.0] - 2024-07-15 ### Added @@ -599,6 +610,7 @@ All notable changes to this project will be documented in this file, per [the Ke - Initial closed source release [Unreleased]: https://github.com/10up/classifai/compare/trunk...develop +[3.1.1]: https://github.com/10up/classifai/compare/3.1.0...3.1.1 [3.1.0]: https://github.com/10up/classifai/compare/3.0.1...3.1.0 [3.0.1]: https://github.com/10up/classifai/compare/3.0.0...3.0.1 [3.0.0]: https://github.com/10up/classifai/compare/2.5.1...3.0.0 diff --git a/CREDITS.md b/CREDITS.md index 40e2bba41..9fcfa9f6e 100644 --- a/CREDITS.md +++ b/CREDITS.md @@ -10,7 +10,7 @@ The following individuals are responsible for curating the list of issues, respo Thank you to all the people who have already contributed to this repository via bug reports, code, design, ideas, project management, translation, testing, etc. -[Darshan Sawardekar (@dsawardekar)](https://github.com/dsawardekar), [Ryan Welcher (@ryanwelcher)](https://github.com/ryanwelcher), [Adam Silverstein (@adamsilverstein)](https://github.com/adamsilverstein), [Jeffrey Paul (@jeffpaul)](https://github.com/jeffpaul), [Helen Hou-Sandí (@helen)](https://github.com/helen), [Christian Chung (@christianc1)](https://github.com/christianc1), [Dependabot (@dependabot)](https://github.com/dependabot), [Dillon McCallum (@McCallumDillon)](https://github.com/McCallumDillon), [Dustin Rue (@dustinrue)](https://github.com/dustinrue), [Jay Wood (@JayWood)](https://github.com/JayWood), [John Watkins (@johnwatkins0)](https://github.com/johnwatkins0), [Matthew McAchran (@mmcachran)](https://github.com/mmcachran), [Tung Du (@dinhtungdu)](https://github.com/dinhtungdu), [Darío Hereñú (@kant)](https://github.com/kant), [Aaron Jorbin (@aaronjorbin)](https://github.com/aaronjorbin), [Eduard Florea (@eflorea)](https://github.com/eflorea), [Jackie Kjome (@JackieKjome)](https://github.com/JackieKjome), [Ricky Lee Whittemore (@rickalee)](https://github.com/rickalee), [Ritesh Patel (@Ritesh-patel)](https://github.com/Ritesh-patel), [Dana Ross (@dana-ross)](https://github.com/dana-ross), [Darin Kotter (@dkotter)](https://github.com/dkotter), [Pete Nelson (@petenelson)](https://github.com/petenelson), [Connor Smyth (@ActuallyConnor)](https://github.com/ActuallyConnor), [Oscar Sanchez S. (@oscarssanchez)](https://github.com/oscarssanchez), [Shah Qureshi (@ShahAaron)](https://github.com/ShahAaron), [Barry Ceelen (@barryceelen)](https://github.com/barryceelen), [Jeffrey Carandang (@phpbits)](https://github.com/phpbits), [Thrijith Thankachan (@thrijith)](https://github.com/thrijith), [Junaid Bhura (@junaidbhura)](https://github.com/junaidbhura), [Blanca Hong [@blancahong]](https://profiles.wordpress.org/blancahong/), [Barney Jeffries (@barneyjeffries)](https://github.com/barneyjeffries), [Siddharth Thevaril (@Sidsector9)](https://github.com/Sidsector9), [@myBCN](https://github.com/myBCN), [James Morrison (@jamesmorrison)](https://github.com/jamesmorrison), [Rahul Prajapati (@rahulsprajapati)](https://github.com/rahulsprajapati), [Sérgio Santos (@s3rgiosan)](https://github.com/s3rgiosan), [Dharmesh Patel (@iamdharmesh)](https://github.com/iamdharmesh), [Delfina Hoxha](https://www.linkedin.com/in/delfina-hoxha/), [Ajay Maurya (@ajmaurya99)](https://github.com/ajmaurya99), [Faisal Alvi (@faisal-alvi)](https://github.com/faisal-alvi), [Mustafa Uysal (@mustafauysal)](https://github.com/mustafauysal), [Max Lyuchin (@cadic)](https://github.com/cadic), [Peter Wilson (@peterwilsoncc)](https://github.com/peterwilsoncc), [Quamruz Zaman (@zamanq)](https://github.com/zamanq), [Ravinder Kumar (@ravinderk)](https://github.com/ravinderk), [Joe McGill (@joemcgill)](https://github.com/joemcgill), [Tyler Bailey (@TylerB24890)](https://github.com/TylerB24890), [Viktor Szépe (@szepeviktor)](https://github.com/szepeviktor), [Ivan Ivanić (@Spoygg)](https://github.com/Spoygg), [Jayedul Kabir (@jayedul)](https://github.com/jayedul), [Garth Gutenberg (@ggutenberg)](https://github.com/ggutenberg), [Mehidi Hassan (@mehidi258)](https://github.com/mehidi258), [Julian Weiland (@derweili)](https://github.com/derweili), [Anton Vanyukov (@av3nger)](https://github.com/av3nger), [Ben Keith (@benlk)](https://github.com/benlk), [David Hechler (@pixeldevsio)](https://github.com/pixeldevsio), [Joshua Abenazer (@joshuaabenazer)](https://github.com/joshuaabenazer), [Dominik Schilling (@ocean90)](https://github.com/ocean90), [Björn Holine (@bjorn2404)](https://github.com/bjorn2404), [Konstantinos Galanakis (@kmgalanakis)](https://github.com/kmgalanakis), [Dan Berko (@berkod)](https://github.com/berkod), [Luca Ricci (@theskinnyghost)](https://github.com/theskinnyghost), [Parikshit Adhikari (@parikshit-adhikari)](https://github.com/parikshit-adhikari), [Surav Shrestha (@shresthasurav)](https://github.com/shresthasurav), [Tim Schwartz (@timatron)](https://github.com/timatron), [Ankit Gupta (@ankitguptaindia)](https://github.com/ankitguptaindia), [Kirtan Gajjar (@kirtangajjar)](https://github.com/kirtangajjar), [Shazahan Kabir Saju (@sksaju)](https://github.com/sksaju), [Giorgos Sarigiannidis (@gsarig)](https://github.com/gsarig), [Harshal Kadu (@QAharshalkadu)](https://github.com/QAharshalkadu), [Sumit Bagthariya (@qasumitbagthariya)](https://github.com/qasumitbagthariya), [ajaxthemestudios (@ajaxthemestudios)](https://github.com/ajaxthemestudios), [CacheMeOwside (@CacheMeOwside)](https://github.com/CacheMeOwside). +[Darshan Sawardekar (@dsawardekar)](https://github.com/dsawardekar), [Ryan Welcher (@ryanwelcher)](https://github.com/ryanwelcher), [Adam Silverstein (@adamsilverstein)](https://github.com/adamsilverstein), [Jeffrey Paul (@jeffpaul)](https://github.com/jeffpaul), [Helen Hou-Sandí (@helen)](https://github.com/helen), [Christian Chung (@christianc1)](https://github.com/christianc1), [Dependabot (@dependabot)](https://github.com/dependabot), [Dillon McCallum (@McCallumDillon)](https://github.com/McCallumDillon), [Dustin Rue (@dustinrue)](https://github.com/dustinrue), [Jay Wood (@JayWood)](https://github.com/JayWood), [John Watkins (@johnwatkins0)](https://github.com/johnwatkins0), [Matthew McAchran (@mmcachran)](https://github.com/mmcachran), [Tung Du (@dinhtungdu)](https://github.com/dinhtungdu), [Darío Hereñú (@kant)](https://github.com/kant), [Aaron Jorbin (@aaronjorbin)](https://github.com/aaronjorbin), [Eduard Florea (@eflorea)](https://github.com/eflorea), [Jackie Kjome (@JackieKjome)](https://github.com/JackieKjome), [Ricky Lee Whittemore (@rickalee)](https://github.com/rickalee), [Ritesh Patel (@Ritesh-patel)](https://github.com/Ritesh-patel), [Dana Ross (@dana-ross)](https://github.com/dana-ross), [Darin Kotter (@dkotter)](https://github.com/dkotter), [Pete Nelson (@petenelson)](https://github.com/petenelson), [Connor Smyth (@ActuallyConnor)](https://github.com/ActuallyConnor), [Oscar Sanchez S. (@oscarssanchez)](https://github.com/oscarssanchez), [Shah Qureshi (@ShahAaron)](https://github.com/ShahAaron), [Barry Ceelen (@barryceelen)](https://github.com/barryceelen), [Jeffrey Carandang (@phpbits)](https://github.com/phpbits), [Thrijith Thankachan (@thrijith)](https://github.com/thrijith), [Junaid Bhura (@junaidbhura)](https://github.com/junaidbhura), [Blanca Hong [@blancahong]](https://profiles.wordpress.org/blancahong/), [Barney Jeffries (@barneyjeffries)](https://github.com/barneyjeffries), [Siddharth Thevaril (@Sidsector9)](https://github.com/Sidsector9), [@myBCN](https://github.com/myBCN), [James Morrison (@jamesmorrison)](https://github.com/jamesmorrison), [Rahul Prajapati (@rahulsprajapati)](https://github.com/rahulsprajapati), [Sérgio Santos (@s3rgiosan)](https://github.com/s3rgiosan), [Dharmesh Patel (@iamdharmesh)](https://github.com/iamdharmesh), [Delfina Hoxha](https://www.linkedin.com/in/delfina-hoxha/), [Ajay Maurya (@ajmaurya99)](https://github.com/ajmaurya99), [Faisal Alvi (@faisal-alvi)](https://github.com/faisal-alvi), [Mustafa Uysal (@mustafauysal)](https://github.com/mustafauysal), [Max Lyuchin (@cadic)](https://github.com/cadic), [Peter Wilson (@peterwilsoncc)](https://github.com/peterwilsoncc), [Quamruz Zaman (@zamanq)](https://github.com/zamanq), [Ravinder Kumar (@ravinderk)](https://github.com/ravinderk), [Joe McGill (@joemcgill)](https://github.com/joemcgill), [Tyler Bailey (@TylerB24890)](https://github.com/TylerB24890), [Viktor Szépe (@szepeviktor)](https://github.com/szepeviktor), [Ivan Ivanić (@Spoygg)](https://github.com/Spoygg), [Jayedul Kabir (@jayedul)](https://github.com/jayedul), [Garth Gutenberg (@ggutenberg)](https://github.com/ggutenberg), [Mehidi Hassan (@mehidi258)](https://github.com/mehidi258), [Julian Weiland (@derweili)](https://github.com/derweili), [Anton Vanyukov (@av3nger)](https://github.com/av3nger), [Ben Keith (@benlk)](https://github.com/benlk), [David Hechler (@pixeldevsio)](https://github.com/pixeldevsio), [Joshua Abenazer (@joshuaabenazer)](https://github.com/joshuaabenazer), [Dominik Schilling (@ocean90)](https://github.com/ocean90), [Björn Holine (@bjorn2404)](https://github.com/bjorn2404), [Konstantinos Galanakis (@kmgalanakis)](https://github.com/kmgalanakis), [Dan Berko (@berkod)](https://github.com/berkod), [Luca Ricci (@theskinnyghost)](https://github.com/theskinnyghost), [Parikshit Adhikari (@parikshit-adhikari)](https://github.com/parikshit-adhikari), [Surav Shrestha (@shresthasurav)](https://github.com/shresthasurav), [Tim Schwartz (@timatron)](https://github.com/timatron), [Ankit Gupta (@ankitguptaindia)](https://github.com/ankitguptaindia), [Kirtan Gajjar (@kirtangajjar)](https://github.com/kirtangajjar), [Shazahan Kabir Saju (@sksaju)](https://github.com/sksaju), [Giorgos Sarigiannidis (@gsarig)](https://github.com/gsarig), [Harshal Kadu (@QAharshalkadu)](https://github.com/QAharshalkadu), [Sumit Bagthariya (@qasumitbagthariya)](https://github.com/qasumitbagthariya), [ajaxthemestudios (@ajaxthemestudios)](https://github.com/ajaxthemestudios), [CacheMeOwside (@CacheMeOwside)](https://github.com/CacheMeOwside), [James Styles (@jamespstyles)](https://github.com/jamespstyles). ## Libraries diff --git a/README.md b/README.md index 02c31654e..309605a23 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# ![ClassifAI](https://classifaiplugin.com/wp-content/themes/classifai-theme/assets/img/logo.svg "ClassifAI") +# ![ClassifAI](https://classifaiplugin.com/wp-content/themes/fse-classifai-theme/assets/img/logo.svg "ClassifAI") > Supercharge WordPress Content Workflows and Engagement with Artificial Intelligence. diff --git a/classifai.php b/classifai.php index 1dbf364e6..e0b93dd08 100644 --- a/classifai.php +++ b/classifai.php @@ -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 diff --git a/config.php b/config.php index ebdb72479..94171a90c 100644 --- a/config.php +++ b/config.php @@ -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' ); diff --git a/includes/Classifai/Providers/Azure/ComputerVision.php b/includes/Classifai/Providers/Azure/ComputerVision.php index 1a947a4d1..a4b6246c7 100644 --- a/includes/Classifai/Providers/Azure/ComputerVision.php +++ b/includes/Classifai/Providers/Azure/ComputerVision.php @@ -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; } @@ -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"}', ] ); diff --git a/includes/Classifai/Providers/OpenAI/ChatGPT.php b/includes/Classifai/Providers/OpenAI/ChatGPT.php index 948eabcf7..6a50aab76 100644 --- a/includes/Classifai/Providers/OpenAI/ChatGPT.php +++ b/includes/Classifai/Providers/OpenAI/ChatGPT.php @@ -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. diff --git a/package-lock.json b/package-lock.json index 6c6ea3657..abaf2cab6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "classifai", - "version": "3.1.0", + "version": "3.1.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "classifai", - "version": "3.1.0", + "version": "3.1.1", "license": "GPL-2.0-or-later", "dependencies": { "@wordpress/icons": "^9.43.0", diff --git a/package.json b/package.json index b59f98763..b6b73c857 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "classifai", - "version": "3.1.0", + "version": "3.1.1", "license": "GPL-2.0-or-later", "repository": "https://github.com/10up/classifai/", "description": "Enhance your WordPress content with Artificial Intelligence and Machine Learning services.", diff --git a/readme.txt b/readme.txt index e4f3f481f..d760d77a2 100644 --- a/readme.txt +++ b/readme.txt @@ -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