- Created a new eveai_chat plugin to support the new dynamic possibilities of the Specialists. Currently only supports standard Rag retrievers (i.e. no extra arguments).

This commit is contained in:
Josako
2024-11-26 13:35:29 +01:00
parent 7702a6dfcc
commit 07d89d204f
42 changed files with 1771 additions and 989 deletions

View File

@@ -0,0 +1,48 @@
<?php
/**
* Plugin Name: EveAI Chat Widget
* Description: Integrates the EveAI chat interface into your WordPress site.
* Version: 2.0.16
* Author: Your Company
* Text Domain: eveai-chat
* Domain Path: /languages
* Requires at least: 5.8
* Requires PHP: 7.4
*/
if (!defined('WPINC')) {
die;
}
// Define plugin constants
define('EVEAI_CHAT_VERSION', '2.0.16');
define('EVEAI_CHAT_PLUGIN_DIR', plugin_dir_path(__FILE__));
define('EVEAI_CHAT_PLUGIN_URL', plugin_dir_url(__FILE__));
// Autoloader
spl_autoload_register(function ($class) {
$prefix = 'EveAI\\Chat\\';
$base_dir = EVEAI_CHAT_PLUGIN_DIR . 'includes/';
$len = strlen($prefix);
if (strncmp($prefix, $class, $len) !== 0) {
return;
}
$relative_class = substr($class, $len);
$file = $base_dir . str_replace('\\', '/', $relative_class) . '.php';
if (file_exists($file)) {
require $file;
}
});
// Load the main plugin class
require_once EVEAI_CHAT_PLUGIN_DIR . 'includes/class-plugin.php';
// Initialize the plugin
function run_eveai_chat() {
$plugin = \EveAI\Chat\Plugin::get_instance();
}
run_eveai_chat();