ai 5.1.0-beta.17 → 5.1.0-beta.19
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 +20 -0
- package/README.md +110 -45
- package/dist/index.d.mts +42 -42
- package/dist/index.d.ts +42 -42
- package/dist/index.js +24 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +23 -3
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.js +1 -1
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +1 -1
- package/dist/internal/index.mjs.map +1 -1
- package/package.json +4 -4
package/dist/index.mjs
CHANGED
|
@@ -711,7 +711,7 @@ import {
|
|
|
711
711
|
} from "@ai-sdk/provider-utils";
|
|
712
712
|
|
|
713
713
|
// src/version.ts
|
|
714
|
-
var VERSION = true ? "5.1.0-beta.
|
|
714
|
+
var VERSION = true ? "5.1.0-beta.19" : "0.0.0-test";
|
|
715
715
|
|
|
716
716
|
// src/util/download/download.ts
|
|
717
717
|
var download = async ({ url }) => {
|
|
@@ -5959,14 +5959,33 @@ var Agent = class {
|
|
|
5959
5959
|
constructor(settings) {
|
|
5960
5960
|
this.settings = settings;
|
|
5961
5961
|
}
|
|
5962
|
+
/**
|
|
5963
|
+
* The name of the agent.
|
|
5964
|
+
*/
|
|
5965
|
+
get name() {
|
|
5966
|
+
return this.settings.name;
|
|
5967
|
+
}
|
|
5968
|
+
/**
|
|
5969
|
+
* The tools that the agent can use.
|
|
5970
|
+
*/
|
|
5962
5971
|
get tools() {
|
|
5963
5972
|
return this.settings.tools;
|
|
5964
5973
|
}
|
|
5965
5974
|
async generate(options) {
|
|
5966
|
-
|
|
5975
|
+
var _a17;
|
|
5976
|
+
return generateText({
|
|
5977
|
+
...this.settings,
|
|
5978
|
+
stopWhen: (_a17 = this.settings.stopWhen) != null ? _a17 : stepCountIs(20),
|
|
5979
|
+
...options
|
|
5980
|
+
});
|
|
5967
5981
|
}
|
|
5968
5982
|
stream(options) {
|
|
5969
|
-
|
|
5983
|
+
var _a17;
|
|
5984
|
+
return streamText({
|
|
5985
|
+
...this.settings,
|
|
5986
|
+
stopWhen: (_a17 = this.settings.stopWhen) != null ? _a17 : stepCountIs(20),
|
|
5987
|
+
...options
|
|
5988
|
+
});
|
|
5970
5989
|
}
|
|
5971
5990
|
/**
|
|
5972
5991
|
* Creates a response object that streams UI messages to the client.
|
|
@@ -10403,6 +10422,7 @@ export {
|
|
|
10403
10422
|
AISDKError18 as AISDKError,
|
|
10404
10423
|
APICallError,
|
|
10405
10424
|
AbstractChat,
|
|
10425
|
+
Agent,
|
|
10406
10426
|
DefaultChatTransport,
|
|
10407
10427
|
DownloadError,
|
|
10408
10428
|
EmptyResponseBodyError,
|