1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "items": [
12 {
13 "topic": "中国电商"
14 },
15 {
16 "topic": "中国新能源汽车"
17 },
18 {
19 "topic": "中国人工智能"
20 }
21 ],
22 "fieldsToUse": [
23 "topic"
24 ],
25 "promptTemplate": "用两句话解释{{topic}}的常见商业场景。",
26 "responseMode": "text",
27 "deduplicate": true,
28 "maxItems": 3,
29 "baseUrl": "https://openrouter.ai/api/v1",
30 "model": "deepseek/deepseek-v4-flash",
31 "maxOutputTokens": 768,
32 "maxTotalTokens": 40000,
33 "temperature": 0.2,
34 "maxConcurrency": 1
35};
36
37
38const run = await client.actor("zinin/chinese-llm-bulk-prompt-runner").call(input);
39
40
41console.log('Results from dataset');
42console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
43const { items } = await client.dataset(run.defaultDatasetId).listItems();
44items.forEach((item) => {
45 console.dir(item);
46});
47
48