diff --git a/examples/demo.ts b/examples/workers/ai/demo.ts similarity index 68% rename from examples/demo.ts rename to examples/workers/ai/demo.ts index 12061dd1a0..c72869bc0c 100644 --- a/examples/demo.ts +++ b/examples/workers/ai/demo.ts @@ -6,9 +6,8 @@ import Cloudflare from 'cloudflare'; const client = new Cloudflare(); async function main() { - const accountId = ''; - - const response = await client.ai.run(accountId, '@cf/meta/llama-2-7b-chat-int8', { + const response = await client.workers.ai.run('@cf/meta/llama-2-7b-chat-int8', { + account_id: process.env['CLOUDFLARE_ACCOUNT_ID']!, prompt: 'Tell me about Workers AI', }); console.log(response);