================================================================================
IMPORTANT: LOAD AI PROVIDERS MODULE IN MAIN PLUGIN FILE
================================================================================

Để sử dụng hệ thống AI Provider, thêm dòng này vào main plugin file:

📝 LOCATION: ai-auto-tool.php hoặc aiautotool-class.php

📋 CODE TO ADD:
--------------------------------------------------------------------------------
// Load AI Providers Module (MUST load before features that use AI)
$ai_providers_path = plugin_dir_path(__FILE__) . 'inc/ai-providers/index.php';
if (file_exists($ai_providers_path)) {
    require_once $ai_providers_path;
}
--------------------------------------------------------------------------------

📍 WHERE TO ADD:
--------------------------------------------------------------------------------
// Load API Manager
require_once plugin_dir_path(__FILE__) . 'inc/aiautotool_api_manager.php';

// ⭐ ADD HERE - Load AI Providers (NEW)
require_once plugin_dir_path(__FILE__) . 'inc/ai-providers/index.php';

// Load features
require_once plugin_dir_path(__FILE__) . 'inc/bot-assistant/aiautotool_bot_assistant.php';
// ... other features
--------------------------------------------------------------------------------

✅ AFTER LOADING, YOU CAN USE:
--------------------------------------------------------------------------------
// Anywhere in plugin:
if (AIAutotool_AI_Helper::is_available()) {
    $result = AIAutotool_AI_Helper::generate('Your prompt here');
    if ($result['success']) {
        echo $result['content'];
    }
}
--------------------------------------------------------------------------------

🔍 VERIFY LOADING:
--------------------------------------------------------------------------------
Add this to admin page for testing:

if (class_exists('AIAutotool_AI_Helper')) {
    echo '✅ AI Providers loaded successfully';
    
    $info = AIAutotool_AI_Helper::get_active_info();
    if ($info) {
        echo '<br>Active: ' . $info['provider_name'] . ' - ' . $info['model'];
    }
} else {
    echo '❌ AI Providers not loaded - Check plugin init';
}
--------------------------------------------------------------------------------

📚 DOCUMENTATION:
--------------------------------------------------------------------------------
- README: inc/ai-providers/README.md
- Integration Guide: docs/AI_PROVIDER_INTEGRATION_GUIDE.md
- System Summary: docs/AI_PROVIDER_SYSTEM_SUMMARY.txt
- How to Integrate: docs/HOW_TO_INTEGRATE_AI_PROVIDERS.md
--------------------------------------------------------------------------------

🆘 TROUBLESHOOTING:
--------------------------------------------------------------------------------
Problem: AI Helper not working
Solution: Make sure to load inc/ai-providers/index.php BEFORE any features

Problem: Providers not showing
Solution: Check API keys are configured in API Keys Manager

Problem: Old code still using hardcoded
Solution: lib/aiautotool_api_helper.php provides backward compatibility
--------------------------------------------------------------------------------

✨ FEATURES:
--------------------------------------------------------------------------------
✅ Support OpenAI, Gemini, LLM7 (15+ models)
✅ Auto-detect best provider
✅ Unified API for all providers
✅ Easy to add new providers
✅ Backward compatible with old code
✅ Settings UI included
✅ Test connection built-in
--------------------------------------------------------------------------------

📞 Need Help? Read the docs folder!
================================================================================

