| Server IP : 121.121.20.254 / Your IP : 216.73.217.64 Web Server : Microsoft-IIS/10.0 System : Windows NT WEB-SERVER 10.0 build 20348 (Windows Server 2022) AMD64 User : IUSR ( 0) PHP Version : 8.3.28 Disable Function : NONE MySQL : ON | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/inetpub/wwwroot/AIWEBSTATION/wp-content/plugins/ai-engine-pro/ |
Upload File : |
<?php
/*
Plugin Name: AI Engine (Pro)
Plugin URI: https://wordpress.org/plugins/ai-engine/
Description: AI meets WordPress. Your site can now chat, write poetry, solve problems, and maybe make you coffee.
Version: 3.7.3
Requires at least: 6.0
Requires PHP: 8.1
Author: Jordy Meow
Author URI: https://jordymeow.com
Text Domain: ai-engine
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
*/
define( 'MWAI_VERSION', '3.7.3' );
define( 'MWAI_PREFIX', 'mwai' );
define( 'MWAI_DOMAIN', 'ai-engine' );
define( 'MWAI_ENTRY', __FILE__ );
define( 'MWAI_PATH', dirname( __FILE__ ) );
define( 'MWAI_URL', plugin_dir_url( __FILE__ ) );
define( 'MWAI_ITEM_ID', 17631833 );
if ( !defined( 'MWAI_TIMEOUT' ) ) {
define( 'MWAI_TIMEOUT', 60 * 5 );
}
if ( !defined( 'MWAI_SSL_VERIFY' ) ) {
// Verify TLS certificates by default (matches WordPress core). Outbound calls
// carry provider API keys, so disabling verification would expose them to MITM.
// Self-hosted endpoints with self-signed certs can opt out by defining this as
// false in wp-config.php.
define( 'MWAI_SSL_VERIFY', true );
}
// What a fresh install lands on, and what anything without an explicit model falls back to.
// These must never point at a model tagged 'deprecated' in constants/models.php: the admin
// then shows a deprecation warning on a brand new site. Re-check them whenever a model is
// tagged deprecated there.
define( 'MWAI_FALLBACK_MODEL', 'gpt-5.6-terra' );
define( 'MWAI_FALLBACK_MODEL_FAST', 'gpt-5.6-luna' );
define( 'MWAI_FALLBACK_MODEL_VISION', 'gpt-5.6-luna' );
define( 'MWAI_FALLBACK_MODEL_JSON', 'gpt-5.6-luna' );
define( 'MWAI_FALLBACK_MODEL_IMAGES', 'gpt-image-2' );
define( 'MWAI_FALLBACK_MODEL_AUDIO', 'whisper-1' );
define( 'MWAI_FALLBACK_MODEL_EMBEDDINGS', 'text-embedding-3-small' );
define( 'MEOWAPPS_MWAI_LICENSE', 'ZIMEEK0000000005603B1EBE59708542' );
update_option( 'mwai_license', [
'key' => 'ZIMEEK0000000005603B1EBE59708542',
'license' => 'valid',
'expires' => 'lifetime',
'issue' => null
] );
require_once( MWAI_PATH . '/classes/init.php' );
add_filter( 'mwai_ai_exception', function ( $exception ) {
try {
// Remove the service prefix if present
if ( strpos( $exception, 'OpenAI:' ) === 0 ) {
$exception = trim( substr( $exception, strlen( 'OpenAI:' ) ) );
}
// If the remaining string looks like JSON, try to decode it
$json = json_decode( $exception, true );
if ( is_array( $json ) && isset( $json['error']['message'] ) ) {
$exception = $json['error']['message'];
}
if ( strpos( $exception, 'OpenAI' ) !== false ) {
if ( strpos( $exception, 'API URL was not found' ) !== false ) {
return "Received the 'API URL was not found' error from OpenAI. This actually means that your OpenAI account has not been enabled for the Chat API. You need to either add some credits to OpenAI account, or link a credit card to it.";
}
}
return $exception;
}
catch ( Exception $e ) {
error_log( $e->getMessage() );
}
return $exception;
} );