| 开发者 |
deshabhishek007
fitehal |
|---|---|
| 更新时间 | 2026年5月30日 02:46 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 7.0 |
| 版权: | GPL-2.0-or-later |
| 版权网址: | 版权信息 |
/wp-content/plugins/.wp-config.php instead of the settings page:
define( 'CLOUDFLARE_WORKERS_AI_ACCOUNT_ID', 'your-account-id' );
define( 'CLOUDFLARE_WORKERS_AI_API_TOKEN', 'your-api-token' );
You can also hard-code the default model (the settings page dropdown takes precedence over this constant):
define( 'CLOUDFLARE_WORKERS_AI_DEFAULT_MODEL', '@cf/meta/llama-3.3-70b-instruct-fp8-fast' );
Environment variables with the same names are also supported.Go to dash.cloudflare.com and select your account. The Account ID appears in the right-hand sidebar of the account home page.
Visit dash.cloudflare.com/profile/api-tokens, click Create Token, and select the Workers AI template (or manually add "Workers AI - Edit" permission).
Yes. Go to Settings → Cloudflare Workers AI and use the Text generation model dropdown. The list is fetched live from your Cloudflare account (all text generation models available to you are shown) and cached for 12 hours.
The default when nothing is selected is Meta Llama 4 Scout 17B — a good all-round starting point. You can also override the model in wp-config.php — the settings page takes precedence over the constant.
Different models have different strengths, response styles, and context lengths. If the default model isn't producing the results you want:
Not in version 1.0. Text generation is supported in this release. Image generation support via Cloudflare Workers AI is planned for a future version.
WordPress requires site administrators to explicitly allow each AI connector before any feature can use it. Go to Settings → Connectors, find Cloudflare Workers AI, and click Allow. You only need to do this once.
No. The WordPress AI Client API is introduced in WordPress 7.0. The plugin will not register itself if the AI Client is not available.