Free.ai WordPress Plugin
AI tools for WordPress. Content generation, images, and more.
Free.ai ar gyfer WordPress
Ychwanegu creu cynnwys, creu delweddau, testun-i-ganu, a chyfieithu yn uniongyrchol i'ch safle WordPress gan ddefnyddio byrlwybrau a'n API REST.
Cychwyn Cyflym: Mewnosod y Celfigyn
Y ffordd gyflymaf o ychwanegu AI i' ch safle WordPress. Gludwch hwn i unrhyw dudalen, erthygl, neu destun gan ddefnyddio' r golygydd HTML:
<script src="https://free.ai/widget.js" data-tool="chat"></script>
Mae hyn yn ychwanegu rhyngwyneb sgwrsio AI i'ch tudalen. Gweler y dudalen Teclyn am bob offer sydd ar gael.
& Dyddiad
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');
Defnyddio' r enw yma mewn unrhyw erthygl neu dudalen:
[freeai prompt="Write a 100-word product description for organic coffee"]
Defnyddio achosion ar gyfer WordPress
- Creu meta-ddisgrifiadau SEO yn awtomatig ar gyfer erthyglau
- Creu delwedd a bwerir gan AI ar gyfer delweddau nodedig
- Cyfieithu erthyglau i nifer o ieithoedd yn ymysgogol
- Ychwanegu sain testun-i-leferydd i erthyglau
- AI chatbot ar gyfer cefnogaeth ymwelwyr
- Crynodeb cynnwys erthyglau ffurf hir