Free.ai WordPress Plugin
AI tools for WordPress. Content generation, images, and more.
වර්ඩ්ප්රෙස් සඳහා Free.ai
AI-බලය අන්තර්ගතය ජනනය එකතු, රූප නිර්මාණය, පෙළ-කථාව, සහ කෙටි කේත සහ අපගේ REST API භාවිතා ඔබේ වර්ඩ්ප්රෙස් අඩවියට සෘජුවම පරිවර්තනය.
ක්ෂණික ආරම්භය: විජෙට්ටුව තිළැලි කරන්න
ඔබේ වර්ඩ්ප්රෙස් අඩවියට AI එකතු කිරීමට වේගවත්ම ක්රමයක්. ඕනෑම පිටුවකට මේ ඇලවීම, පශ්චාත්, හෝ HTML සංස්කාරක භාවිතා විජට්:
<script src="https://free.ai/widget.js" data-tool="chat"></script>
මෙම ඔබේ පිටුව AI චැට් අතුරුමුහුණත එකතු. බලන්න විජට් පිටුව සියලු ඇති මෙවලම් සඳහා.
රිසිකළ කෙටි කේතය (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');
එවිට ඕනෑම පශ්චාත් හෝ පිටුව එය භාවිතා:
[freeai prompt="Write a 100-word product description for organic coffee"]
වර්ඩ්ප්රෙස් සඳහා නඩු භාවිතා
- තනතුරු සඳහා ස්වයංක්රීය-උත්පාදනය SEO මෙටා විස්තරය
- විශේෂාංග රූප සඳහා AI-බලය රූප ජනනය
- භාෂා බොහොමයක් ස්වයංක්රීයව පරිවර්තනය තනතුරු
- ලිපි පෙළ-කතා ශ්රව්ය එක් කරන්න
- අමුත්තන් සහාය සඳහා AI chatbot
- දිගු-ආකෘතිය ලිපි සඳහා අන්තර්ගත සාරාංශය