Free.ai WordPress Plugin
AI tools for WordPress. Content generation, images, and more.
Free.ai për WordPress
Shto krijimin e përmbajtjes së mbështetur nga AI, krijimin e imazheve, tekst-në-folje dhe përkthimin drejtpërsëdrejti në faqen tënde WordPress duke përdorur shortcodes dhe API-në tonë REST.
Fillimi i shpejtë
Mënyra më e shpejtë për të shtuar AI në site-in tuaj WordPress. Ngjite këtë në çdo faqe, postim apo widget duke përdorur editorin HTML:
<script src="https://free.ai/widget.js" data-tool="chat"></script>
Kjo shtoi një ndërfaqe chat AI në faqen tuaj. Shiko faqen Widget për të gjitha instrumentët në dispozicion.
Kodi i shkurtër i personalizuar (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' => 'qwen7b'], $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');
Pastaj përdore atë në çdo postim apo faqe:
[freeai prompt="Write a 100-word product description for organic coffee"]
Përdorimi i rasteve për WordPress
- Gjenerati automatik SEO meta përshkrimet për postat
- Gjenerati i figurave me AI për figurat e paraqitura
- Përkthe automatikisht postat në gjuhë të ndryshme
- Shto tekst-në-folje audio tek artikujt
- AI chatbot për mbështetjen e vizitorëve
- Përmbledhja e përmbajtjes për artikullin e gjatë