Free.ai WordPress Plugin
AI tools for WordPress. Content generation, images, and more.
Free.ai សម្រាប់ WordPress
បន្ថែម AI-powered មាតិកាជំនាន់, ការបង្កើតរូបភាព, អត្ថបទទៅជាសម្ដី, និងបកប្រែដោយផ្ទាល់ទៅគេហទំព័រ WordPress របស់អ្នកដោយប្រើ shortcodes និង REST API របស់យើង.
ចាប់ផ្ដើមរហ័ស & # 160; ៖ បង្កប់ធាតុក្រាហ្វិក
វិធីរហ័សបំផុតដើម្បីបន្ថែម AI ទៅគេហទំព័រ WordPress របស់អ្នក. បិទភ្ជាប់នេះទៅក្នុងទំព័រណាមួយ, ប្រកាស, ឬធាតុក្រាហ្វិកដោយប្រើកម្មវិធីនិពន្ធ HTML:
<script src="https://free.ai/widget.js" data-tool="chat"></script>
នេះបន្ថែមចំណុចប្រទាក់ជជែកកំសាន្ត AI ទៅទំព័ររបស់អ្នក & # 160; ។ មើល ទំព័រធាតុក្រាហ្វិក សម្រាប់ឧបករណ៍ដែលមានទាំងអស់ & # 160; ។
កូដខ្លីផ្ទាល់ខ្លួន (PHP)
Create a WordPress shortcode that calls the Free.ai API. Add this to your theme's functions.php:
function freeai_generate($atts) {
$atts = shortcode_atts(['prompt' => '', 'model' => 'qwen2.5-72b'], $atts);
$response = wp_remote_post('https://api.free.ai/v1/chat/completions', [
'headers' => [
'Authorization' => 'Bearer YOUR_API_KEY',
'Content-Type' => 'application/json',
],
'body' => json_encode([
'model' => $atts['model'],
'messages' => [['role' => 'user', 'content' => $atts['prompt']]],
]),
]);
if (is_wp_error($response)) return 'Error generating content.';
$body = json_decode(wp_remote_retrieve_body($response), true);
return '<div class="freeai-output">' .
esc_html($body['choices'][0]['message']['content'] ?? '') .
'</div>';
}
add_shortcode('freeai', 'freeai_generate');
បន្ទាប់មកប្រើវាក្នុងអត្ថបទ ឬទំព័រណាមួយ & # 160; ៖
[freeai prompt="Write a 100-word product description for organic coffee"]
ប្រើករណីសម្រាប់ WordPress
- បង្កើតសេចក្ដីពិពណ៌នាមេតា SEO ដោយស្វ័យប្រវត្តិសម្រាប់ប្រកាស
- ការបង្កើតរូបភាពដែលមានថាមពល AI សម្រាប់រូបភាពដែលបានបង្ហាញ
- បកប្រែអត្ថបទទៅជាភាសាច្រើនដោយស្វ័យប្រវត្តិ
- បន្ថែមអត្ថបទទៅជាសំឡេងទៅអត្ថបទ
- AI chatbot សម្រាប់ការគាំទ្រអ្នកទស្សនា
- សេចក្ដីសង្ខេបមាតិកាសម្រាប់អត្ថបទទម្រង់វែង