ai 6.0.16 → 6.0.18
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 +12 -0
- package/dist/index.d.mts +1 -2
- package/dist/index.d.ts +1 -2
- package/dist/index.js +4 -7
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4 -7
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.js +1 -1
- package/dist/internal/index.mjs +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# ai
|
|
2
2
|
|
|
3
|
+
## 6.0.18
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- d6ec0e2: chore(ai): remove \_internal.currentDate from generateText
|
|
8
|
+
|
|
9
|
+
## 6.0.17
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- af0955e: streamText should throw timeout error with proper cause when it times out
|
|
14
|
+
|
|
3
15
|
## 6.0.16
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/dist/index.d.mts
CHANGED
|
@@ -1350,7 +1350,7 @@ If set and supported by the model, calls will generate deterministic results.
|
|
|
1350
1350
|
@returns
|
|
1351
1351
|
A result object that contains the generated text, the results of the tool calls, and additional information.
|
|
1352
1352
|
*/
|
|
1353
|
-
declare function generateText<TOOLS extends ToolSet, OUTPUT extends Output = Output<string, string>>({ model: modelArg, tools, toolChoice, system, prompt, messages, maxRetries: maxRetriesArg, abortSignal, timeout, headers, stopWhen, experimental_output, output, experimental_telemetry: telemetry, providerOptions, experimental_activeTools, activeTools, experimental_prepareStep, prepareStep, experimental_repairToolCall: repairToolCall, experimental_download: download, experimental_context, _internal: { generateId
|
|
1353
|
+
declare function generateText<TOOLS extends ToolSet, OUTPUT extends Output = Output<string, string>>({ model: modelArg, tools, toolChoice, system, prompt, messages, maxRetries: maxRetriesArg, abortSignal, timeout, headers, stopWhen, experimental_output, output, experimental_telemetry: telemetry, providerOptions, experimental_activeTools, activeTools, experimental_prepareStep, prepareStep, experimental_repairToolCall: repairToolCall, experimental_download: download, experimental_context, _internal: { generateId }, onStepFinish, onFinish, ...settings }: CallSettings & Prompt & {
|
|
1354
1354
|
/**
|
|
1355
1355
|
The language model to use.
|
|
1356
1356
|
*/
|
|
@@ -1438,7 +1438,6 @@ A function that attempts to repair a tool call that failed to parse.
|
|
|
1438
1438
|
*/
|
|
1439
1439
|
_internal?: {
|
|
1440
1440
|
generateId?: IdGenerator;
|
|
1441
|
-
currentDate?: () => Date;
|
|
1442
1441
|
};
|
|
1443
1442
|
}): Promise<GenerateTextResult<TOOLS, OUTPUT>>;
|
|
1444
1443
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1350,7 +1350,7 @@ If set and supported by the model, calls will generate deterministic results.
|
|
|
1350
1350
|
@returns
|
|
1351
1351
|
A result object that contains the generated text, the results of the tool calls, and additional information.
|
|
1352
1352
|
*/
|
|
1353
|
-
declare function generateText<TOOLS extends ToolSet, OUTPUT extends Output = Output<string, string>>({ model: modelArg, tools, toolChoice, system, prompt, messages, maxRetries: maxRetriesArg, abortSignal, timeout, headers, stopWhen, experimental_output, output, experimental_telemetry: telemetry, providerOptions, experimental_activeTools, activeTools, experimental_prepareStep, prepareStep, experimental_repairToolCall: repairToolCall, experimental_download: download, experimental_context, _internal: { generateId
|
|
1353
|
+
declare function generateText<TOOLS extends ToolSet, OUTPUT extends Output = Output<string, string>>({ model: modelArg, tools, toolChoice, system, prompt, messages, maxRetries: maxRetriesArg, abortSignal, timeout, headers, stopWhen, experimental_output, output, experimental_telemetry: telemetry, providerOptions, experimental_activeTools, activeTools, experimental_prepareStep, prepareStep, experimental_repairToolCall: repairToolCall, experimental_download: download, experimental_context, _internal: { generateId }, onStepFinish, onFinish, ...settings }: CallSettings & Prompt & {
|
|
1354
1354
|
/**
|
|
1355
1355
|
The language model to use.
|
|
1356
1356
|
*/
|
|
@@ -1438,7 +1438,6 @@ A function that attempts to repair a tool call that failed to parse.
|
|
|
1438
1438
|
*/
|
|
1439
1439
|
_internal?: {
|
|
1440
1440
|
generateId?: IdGenerator;
|
|
1441
|
-
currentDate?: () => Date;
|
|
1442
1441
|
};
|
|
1443
1442
|
}): Promise<GenerateTextResult<TOOLS, OUTPUT>>;
|
|
1444
1443
|
|
package/dist/index.js
CHANGED
|
@@ -1013,7 +1013,7 @@ var import_provider_utils3 = require("@ai-sdk/provider-utils");
|
|
|
1013
1013
|
var import_provider_utils4 = require("@ai-sdk/provider-utils");
|
|
1014
1014
|
|
|
1015
1015
|
// src/version.ts
|
|
1016
|
-
var VERSION = true ? "6.0.
|
|
1016
|
+
var VERSION = true ? "6.0.18" : "0.0.0-test";
|
|
1017
1017
|
|
|
1018
1018
|
// src/util/download/download.ts
|
|
1019
1019
|
var download = async ({ url }) => {
|
|
@@ -3659,10 +3659,7 @@ async function generateText({
|
|
|
3659
3659
|
experimental_repairToolCall: repairToolCall,
|
|
3660
3660
|
experimental_download: download2,
|
|
3661
3661
|
experimental_context,
|
|
3662
|
-
_internal: {
|
|
3663
|
-
generateId: generateId2 = originalGenerateId,
|
|
3664
|
-
currentDate = () => /* @__PURE__ */ new Date()
|
|
3665
|
-
} = {},
|
|
3662
|
+
_internal: { generateId: generateId2 = originalGenerateId } = {},
|
|
3666
3663
|
onStepFinish,
|
|
3667
3664
|
onFinish,
|
|
3668
3665
|
...settings
|
|
@@ -3884,7 +3881,7 @@ async function generateText({
|
|
|
3884
3881
|
});
|
|
3885
3882
|
const responseData = {
|
|
3886
3883
|
id: (_b2 = (_a18 = result.response) == null ? void 0 : _a18.id) != null ? _b2 : generateId2(),
|
|
3887
|
-
timestamp: (_d2 = (_c2 = result.response) == null ? void 0 : _c2.timestamp) != null ? _d2 :
|
|
3884
|
+
timestamp: (_d2 = (_c2 = result.response) == null ? void 0 : _c2.timestamp) != null ? _d2 : /* @__PURE__ */ new Date(),
|
|
3888
3885
|
modelId: (_f2 = (_e2 = result.response) == null ? void 0 : _e2.modelId) != null ? _f2 : stepModel.modelId,
|
|
3889
3886
|
headers: (_g2 = result.response) == null ? void 0 : _g2.headers,
|
|
3890
3887
|
body: (_h2 = result.response) == null ? void 0 : _h2.body
|
|
@@ -6058,7 +6055,7 @@ var DefaultStreamTextResult = class {
|
|
|
6058
6055
|
async flush(controller) {
|
|
6059
6056
|
try {
|
|
6060
6057
|
if (recordedSteps.length === 0) {
|
|
6061
|
-
const error = new NoOutputGeneratedError({
|
|
6058
|
+
const error = (abortSignal == null ? void 0 : abortSignal.aborted) ? abortSignal.reason : new NoOutputGeneratedError({
|
|
6062
6059
|
message: "No output generated. Check the stream for errors."
|
|
6063
6060
|
});
|
|
6064
6061
|
self._finishReason.reject(error);
|