1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "text": "The water cycle describes the continuous movement of water on, above, and below the surface of the Earth. Water undergoes evaporation, condensation, and precipitation. During evaporation, water turns from liquid to vapor and rises into the atmosphere. Condensation occurs when water vapor cools and forms clouds. Precipitation happens when water falls from clouds as rain, snow, sleet, or hail.",
12 "questionType": "mixed",
13 "numQuestions": 5,
14 "difficulty": "medium"
15};
16
17
18const run = await client.actor("akash9078/ai-questions-generator").call(input);
19
20
21console.log('Results from dataset');
22console.log(`πΎ Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
23const { items } = await client.dataset(run.defaultDatasetId).listItems();
24items.forEach((item) => {
25 console.dir(item);
26});
27
28