1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "claims": [
12 {
13 "claimId": "demo-1",
14 "source": {
15 "url": "https://flintglade-tools.github.io/apify-fixtures/benchmarks/demo.html",
16 "locator": "#claim-1"
17 },
18 "model": {
19 "name": "ExampleModel",
20 "revision": "abc123"
21 },
22 "benchmark": {
23 "name": "ExampleBench",
24 "version": "1.0",
25 "split": "test"
26 },
27 "metric": {
28 "name": "accuracy",
29 "value": "0.812",
30 "unit": "fraction",
31 "direction": "higher_is_better"
32 },
33 "protocol": {
34 "shots": 0,
35 "promptTemplate": "fixture-v1"
36 }
37 }
38 ]
39};
40
41
42const run = await client.actor("flintglade/ai-benchmark-claim-normalizer").call(input);
43
44
45console.log('Results from dataset');
46console.log(`πΎ Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
47const { items } = await client.dataset(run.defaultDatasetId).listItems();
48items.forEach((item) => {
49 console.dir(item);
50});
51
52