@arcadeai/arcadejs 1.6.0 → 1.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/README.md +21 -33
- package/package.json +1 -1
- package/src/version.ts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.6.1 (2025-06-04)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v1.6.0...v1.6.1](https://github.com/ArcadeAI/arcade-js/compare/v1.6.0...v1.6.1)
|
|
6
|
+
|
|
7
|
+
### Chores
|
|
8
|
+
|
|
9
|
+
* **docs:** use top-level-await in example snippets ([e6314e7](https://github.com/ArcadeAI/arcade-js/commit/e6314e7c3515b8a689cc8521bcb511afe034911a))
|
|
10
|
+
|
|
3
11
|
## 1.6.0 (2025-06-02)
|
|
4
12
|
|
|
5
13
|
Full Changelog: [v1.5.0...v1.6.0](https://github.com/ArcadeAI/arcade-js/compare/v1.5.0...v1.6.0)
|
package/README.md
CHANGED
|
@@ -26,17 +26,13 @@ const client = new Arcade({
|
|
|
26
26
|
apiKey: process.env['ARCADE_API_KEY'], // This is the default and can be omitted
|
|
27
27
|
});
|
|
28
28
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
});
|
|
35
|
-
|
|
36
|
-
console.log(executeToolResponse.id);
|
|
37
|
-
}
|
|
29
|
+
const executeToolResponse = await client.tools.execute({
|
|
30
|
+
tool_name: 'Google.ListEmails',
|
|
31
|
+
input: { n_emails: 10 },
|
|
32
|
+
user_id: 'user@example.com',
|
|
33
|
+
});
|
|
38
34
|
|
|
39
|
-
|
|
35
|
+
console.log(executeToolResponse.id);
|
|
40
36
|
```
|
|
41
37
|
|
|
42
38
|
### Request & Response types
|
|
@@ -51,14 +47,10 @@ const client = new Arcade({
|
|
|
51
47
|
apiKey: process.env['ARCADE_API_KEY'], // This is the default and can be omitted
|
|
52
48
|
});
|
|
53
49
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
const chatResponse: Arcade.ChatResponse = await client.chat.completions.create(params);
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
main();
|
|
50
|
+
const params: Arcade.Chat.CompletionCreateParams = {
|
|
51
|
+
messages: [{ role: 'user', content: 'Hello, how can I use Arcade?' }],
|
|
52
|
+
};
|
|
53
|
+
const chatResponse: Arcade.ChatResponse = await client.chat.completions.create(params);
|
|
62
54
|
```
|
|
63
55
|
|
|
64
56
|
Documentation for each method, request param, and response field are available in docstrings and will appear on hover in most modern editors.
|
|
@@ -71,21 +63,17 @@ a subclass of `APIError` will be thrown:
|
|
|
71
63
|
|
|
72
64
|
<!-- prettier-ignore -->
|
|
73
65
|
```ts
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
});
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
main();
|
|
66
|
+
const chatResponse = await client.chat.completions
|
|
67
|
+
.create({ messages: [{ role: 'user', content: 'Hello, how can I use Arcade?' }] })
|
|
68
|
+
.catch(async (err) => {
|
|
69
|
+
if (err instanceof Arcade.APIError) {
|
|
70
|
+
console.log(err.status); // 400
|
|
71
|
+
console.log(err.name); // BadRequestError
|
|
72
|
+
console.log(err.headers); // {server: 'nginx', ...}
|
|
73
|
+
} else {
|
|
74
|
+
throw err;
|
|
75
|
+
}
|
|
76
|
+
});
|
|
89
77
|
```
|
|
90
78
|
|
|
91
79
|
Error codes are as follows:
|
package/package.json
CHANGED
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '1.6.
|
|
1
|
+
export const VERSION = '1.6.1'; // x-release-please-version
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "1.6.
|
|
1
|
+
export declare const VERSION = "1.6.1";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '1.6.
|
|
1
|
+
export const VERSION = '1.6.1'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|