ai 3.1.21 → 3.1.23
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/dist/index.d.mts +7 -3
- package/dist/index.d.ts +7 -3
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/react/dist/index.d.mts +17 -2
- package/react/dist/index.d.ts +17 -2
- package/react/dist/index.js +28 -24
- package/react/dist/index.js.map +1 -1
- package/react/dist/index.mjs +28 -24
- package/react/dist/index.mjs.map +1 -1
- package/rsc/dist/index.d.ts +1 -1
- package/rsc/dist/rsc-server.d.mts +1 -1
- package/rsc/dist/rsc-server.mjs.map +1 -1
package/dist/index.mjs
CHANGED
@@ -1250,6 +1250,7 @@ async function generateText({
|
|
1250
1250
|
maxRetries,
|
1251
1251
|
abortSignal,
|
1252
1252
|
maxAutomaticRoundtrips = 0,
|
1253
|
+
maxToolRoundtrips = maxAutomaticRoundtrips,
|
1253
1254
|
...settings
|
1254
1255
|
}) {
|
1255
1256
|
var _a, _b, _c;
|
@@ -1294,7 +1295,7 @@ async function generateText({
|
|
1294
1295
|
// there are tool calls:
|
1295
1296
|
currentToolCalls.length > 0 && // all current tool calls have results:
|
1296
1297
|
currentToolResults.length === currentToolCalls.length && // the number of roundtrips is less than the maximum:
|
1297
|
-
roundtrips++ <
|
1298
|
+
roundtrips++ < maxToolRoundtrips
|
1298
1299
|
);
|
1299
1300
|
return new GenerateTextResult({
|
1300
1301
|
// Always return a string so that the caller doesn't have to check for undefined.
|