ai 6.0.0-beta.141 → 6.0.0-beta.142
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 +7 -0
- package/dist/index.d.mts +14 -3
- package/dist/index.d.ts +14 -3
- package/dist/index.js +5 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5 -3
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.js +1 -1
- package/dist/internal/index.mjs +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
package/dist/index.d.mts
CHANGED
|
@@ -1057,6 +1057,8 @@ Function that you can use to provide different settings for a step.
|
|
|
1057
1057
|
@param options.steps - The steps that have been executed so far.
|
|
1058
1058
|
@param options.stepNumber - The number of the step that is being executed.
|
|
1059
1059
|
@param options.model - The model that is being used.
|
|
1060
|
+
@param options.messages - The messages that will be sent to the model for the current step.
|
|
1061
|
+
@param options.experimental_context - The context passed via the experimental_context setting (experimental).
|
|
1060
1062
|
|
|
1061
1063
|
@returns An object that contains the settings for the step.
|
|
1062
1064
|
If you return undefined (or for undefined settings), the settings from the outer level will be used.
|
|
@@ -1066,6 +1068,7 @@ type PrepareStepFunction<TOOLS extends Record<string, Tool> = Record<string, Too
|
|
|
1066
1068
|
stepNumber: number;
|
|
1067
1069
|
model: LanguageModel;
|
|
1068
1070
|
messages: Array<ModelMessage>;
|
|
1071
|
+
experimental_context?: unknown;
|
|
1069
1072
|
}) => PromiseLike<PrepareStepResult<TOOLS>> | PrepareStepResult<TOOLS>;
|
|
1070
1073
|
type PrepareStepResult<TOOLS extends Record<string, Tool> = Record<string, Tool>> = {
|
|
1071
1074
|
model?: LanguageModel;
|
|
@@ -2682,13 +2685,21 @@ Callback that is set using the `onFinish` option.
|
|
|
2682
2685
|
*/
|
|
2683
2686
|
type ToolLoopAgentOnFinishCallback<TOOLS extends ToolSet = {}> = (event: StepResult<TOOLS> & {
|
|
2684
2687
|
/**
|
|
2685
|
-
Details for all steps.
|
|
2686
|
-
|
|
2688
|
+
* Details for all steps.
|
|
2689
|
+
*/
|
|
2687
2690
|
readonly steps: StepResult<TOOLS>[];
|
|
2688
2691
|
/**
|
|
2689
|
-
Total usage for all steps. This is the sum of the usage of all steps.
|
|
2692
|
+
* Total usage for all steps. This is the sum of the usage of all steps.
|
|
2690
2693
|
*/
|
|
2691
2694
|
readonly totalUsage: LanguageModelUsage;
|
|
2695
|
+
/**
|
|
2696
|
+
* Context that is passed into tool calls.
|
|
2697
|
+
*
|
|
2698
|
+
* Experimental (can break in patch releases).
|
|
2699
|
+
*
|
|
2700
|
+
* @default undefined
|
|
2701
|
+
*/
|
|
2702
|
+
experimental_context?: unknown;
|
|
2692
2703
|
}) => PromiseLike<void> | void;
|
|
2693
2704
|
|
|
2694
2705
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -1057,6 +1057,8 @@ Function that you can use to provide different settings for a step.
|
|
|
1057
1057
|
@param options.steps - The steps that have been executed so far.
|
|
1058
1058
|
@param options.stepNumber - The number of the step that is being executed.
|
|
1059
1059
|
@param options.model - The model that is being used.
|
|
1060
|
+
@param options.messages - The messages that will be sent to the model for the current step.
|
|
1061
|
+
@param options.experimental_context - The context passed via the experimental_context setting (experimental).
|
|
1060
1062
|
|
|
1061
1063
|
@returns An object that contains the settings for the step.
|
|
1062
1064
|
If you return undefined (or for undefined settings), the settings from the outer level will be used.
|
|
@@ -1066,6 +1068,7 @@ type PrepareStepFunction<TOOLS extends Record<string, Tool> = Record<string, Too
|
|
|
1066
1068
|
stepNumber: number;
|
|
1067
1069
|
model: LanguageModel;
|
|
1068
1070
|
messages: Array<ModelMessage>;
|
|
1071
|
+
experimental_context?: unknown;
|
|
1069
1072
|
}) => PromiseLike<PrepareStepResult<TOOLS>> | PrepareStepResult<TOOLS>;
|
|
1070
1073
|
type PrepareStepResult<TOOLS extends Record<string, Tool> = Record<string, Tool>> = {
|
|
1071
1074
|
model?: LanguageModel;
|
|
@@ -2682,13 +2685,21 @@ Callback that is set using the `onFinish` option.
|
|
|
2682
2685
|
*/
|
|
2683
2686
|
type ToolLoopAgentOnFinishCallback<TOOLS extends ToolSet = {}> = (event: StepResult<TOOLS> & {
|
|
2684
2687
|
/**
|
|
2685
|
-
Details for all steps.
|
|
2686
|
-
|
|
2688
|
+
* Details for all steps.
|
|
2689
|
+
*/
|
|
2687
2690
|
readonly steps: StepResult<TOOLS>[];
|
|
2688
2691
|
/**
|
|
2689
|
-
Total usage for all steps. This is the sum of the usage of all steps.
|
|
2692
|
+
* Total usage for all steps. This is the sum of the usage of all steps.
|
|
2690
2693
|
*/
|
|
2691
2694
|
readonly totalUsage: LanguageModelUsage;
|
|
2695
|
+
/**
|
|
2696
|
+
* Context that is passed into tool calls.
|
|
2697
|
+
*
|
|
2698
|
+
* Experimental (can break in patch releases).
|
|
2699
|
+
*
|
|
2700
|
+
* @default undefined
|
|
2701
|
+
*/
|
|
2702
|
+
experimental_context?: unknown;
|
|
2692
2703
|
}) => PromiseLike<void> | void;
|
|
2693
2704
|
|
|
2694
2705
|
/**
|
package/dist/index.js
CHANGED
|
@@ -962,7 +962,7 @@ function detectMediaType({
|
|
|
962
962
|
var import_provider_utils2 = require("@ai-sdk/provider-utils");
|
|
963
963
|
|
|
964
964
|
// src/version.ts
|
|
965
|
-
var VERSION = true ? "6.0.0-beta.
|
|
965
|
+
var VERSION = true ? "6.0.0-beta.142" : "0.0.0-test";
|
|
966
966
|
|
|
967
967
|
// src/util/download/download.ts
|
|
968
968
|
var download = async ({ url }) => {
|
|
@@ -3549,7 +3549,8 @@ async function generateText({
|
|
|
3549
3549
|
model,
|
|
3550
3550
|
steps,
|
|
3551
3551
|
stepNumber: steps.length,
|
|
3552
|
-
messages: stepInputMessages
|
|
3552
|
+
messages: stepInputMessages,
|
|
3553
|
+
experimental_context
|
|
3553
3554
|
}));
|
|
3554
3555
|
const stepModel = resolveLanguageModel(
|
|
3555
3556
|
(_a15 = prepareStepResult == null ? void 0 : prepareStepResult.model) != null ? _a15 : model
|
|
@@ -5943,7 +5944,8 @@ var DefaultStreamTextResult = class {
|
|
|
5943
5944
|
model,
|
|
5944
5945
|
steps: recordedSteps,
|
|
5945
5946
|
stepNumber: recordedSteps.length,
|
|
5946
|
-
messages: stepInputMessages
|
|
5947
|
+
messages: stepInputMessages,
|
|
5948
|
+
experimental_context
|
|
5947
5949
|
}));
|
|
5948
5950
|
const stepModel = resolveLanguageModel(
|
|
5949
5951
|
(_a15 = prepareStepResult == null ? void 0 : prepareStepResult.model) != null ? _a15 : model
|