PluginProbe
AI Engine – The Chatbot, AI Framework & MCP for WordPress / 1.9.98
AI Engine – The Chatbot, AI Framework & MCP for WordPress v1.9.98
3.7.7 3.7.6 3.7.5 3.7.4 3.7.3 3.7.2 3.7.1 3.7.0 3.6.9 3.6.8 3.6.7 3.6.6 3.6.4 3.6.5 3.6.3 3.6.2 3.6.1 3.6.0 3.5.9 3.5.8 3.5.7 3.5.6 3.5.5 3.5.4 3.5.3 All 527 releases
ai-engine / ai-engine.php

ai-engine.php in AI Engine – The Chatbot, AI Framework & MCP for WordPress 1.9.98, at ai-engine.php

47 lines 1.9 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /*
3 Plugin Name: AI Engine: Chatbots, Generators, Assistants, GPT 4 and more!
4 Plugin URI: https://wordpress.org/plugins/ai-engine/
5 Description: Add AI into WordPress! Chatbot (ChatGPT), content and images generators, copilot, model training and much more! Highly customizable, sleek UI. You will love it!
6 Version: 1.9.98
7 Author: Jordy Meow
8 Author URI: https://jordymeow.com
9 Text Domain: ai-engine
10
11 Dual licensed under the MIT and GPL licenses:
12 http://www.opensource.org/licenses/mit-license.php
13 http://www.gnu.org/licenses/gpl.html
14 */
15
16 define( 'MWAI_VERSION', '1.9.98' );
17 define( 'MWAI_PREFIX', 'mwai' );
18 define( 'MWAI_DOMAIN', 'ai-engine' );
19 define( 'MWAI_ENTRY', __FILE__ );
20 define( 'MWAI_PATH', dirname( __FILE__ ) );
21 define( 'MWAI_URL', plugin_dir_url( __FILE__ ) );
22 define( 'MWAI_TIMEOUT', 60 * 5 );
23 define( 'MWAI_FALLBACK_MODEL', 'gpt-3.5-turbo' );
24 define( 'MWAI_FALLBACK_MODEL_VISION', 'gpt-4-vision-preview' );
25 define( 'MWAI_FALLBACK_MODEL_JSON', 'gpt-4-1106-preview' );
26
27 require_once( MWAI_PATH . '/classes/init.php' );
28
29 // NOTE: This should be removed when GPT-4 is released to everyone.
30 add_filter( 'mwai_ai_exception', function ( $exception ) {
31 try {
32 if ( substr( $exception, 0, 56 ) === "Error model_not_found: The model: `gpt-4` does not exist" ) {
33 return "The GPT-4 model is currently not available for your OpenAI account. Luckily, you can join the <a target='_blank' href='https://openai.com/waitlist/gpt-4-api'>waitlist</a> to get access to it! ✌️";
34 }
35 else if ( substr( $exception, 0, 60 ) === "Error model_not_found: The model: `gpt-4-32k` does not exist" ) {
36 return "The GPT-4 32k model is currently not available for your OpenAI account. Luckily, you can join the <a target='_blank' href='https://openai.com/waitlist/gpt-4-api'>waitlist</a> to get access to it! ✌️";
37 }
38 return $exception;
39 }
40 catch ( Exception $e ) {
41 error_log( $e->getMessage() );
42 }
43 return $exception;
44 } );
45
46 ?>
47