Free.ai WordPress Plugin
AI tools for WordPress. Content generation, images, and more.
Free.ai bakeng sa WordPress
E eketsa ho theha litaba tse matla tsa AI, ho theha litšoantšo, ho ngola ho bua le ho fetolela ka kotloloho ho sebaka sa hau sa WordPress ka ho sebelisa shortcodes le REST API ea rona.
Qhobosha Widget
Tsela e potlakileng ea ho eketsa AI ho sebaka sa hau sa WordPress. Kopa sena ho leqephe leha e le lefe, poso, kapa widget ka ho sebelisa moqapi oa HTML:
<script src="https://free.ai/widget.js" data-tool="chat"></script>
Sena se eketsa sebaka sa ho bua sa AI ho leqephe la hau. Bona leqephe la Widget bakeng sa lisebelisoa tsohle tse fumanehang.
Li-shortcodes tsa khethehileng (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');
Ka mor'a moo, sebelisa ho sengoloa kapa leqephe leha e le lefe:
[freeai prompt="Write a 100-word product description for organic coffee"]
Ho sebelisa liketsahalo bakeng sa WordPress
- Auto-e etsa SEO meta litlhaloso bakeng sa lihlooho
- Ho theha litšoantšo tse nang le AI bakeng sa litšoantšo tse hlahisitsoeng
- Tlosa lingoloa ka ho toba ho lipuo tse ngata
- E-ba le lingoloa tse nang le li-audio tsa ho bua
- AI chatbot bakeng sa ho tšehetsa baeti
- Litlhaloso tsa lihlooho tsa lihlooho tse telele