@ai-sdk/workflow 2.0.19 → 2.0.20
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 +6 -0
- package/dist/index.d.ts +3 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/workflow-agent.ts +16 -10
package/CHANGELOG.md
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -284,7 +284,7 @@ interface PrepareCallOptions<TTools extends ToolSet = ToolSet, TRuntimeContext e
|
|
|
284
284
|
tools: TTools;
|
|
285
285
|
instructions?: Instructions;
|
|
286
286
|
toolChoice?: ToolChoice<TTools>;
|
|
287
|
-
stopWhen?: StopCondition<NoInfer<
|
|
287
|
+
stopWhen?: StopCondition<NoInfer<TTools>, TRuntimeContext> | Array<StopCondition<NoInfer<TTools>, TRuntimeContext>>;
|
|
288
288
|
activeTools?: ActiveTools<NoInfer<TTools>>;
|
|
289
289
|
experimental_download?: DownloadFunction;
|
|
290
290
|
telemetry?: TelemetryOptions<TRuntimeContext, TTools>;
|
|
@@ -369,7 +369,7 @@ type WorkflowAgentOptions<TTools extends ToolSet = ToolSet, TRuntimeContext exte
|
|
|
369
369
|
*
|
|
370
370
|
* Per-stream `stopWhen` values passed to `stream()` override this default.
|
|
371
371
|
*/
|
|
372
|
-
stopWhen?: StopCondition<NoInfer<
|
|
372
|
+
stopWhen?: StopCondition<NoInfer<TTools>, TRuntimeContext> | Array<StopCondition<NoInfer<TTools>, TRuntimeContext>>;
|
|
373
373
|
/**
|
|
374
374
|
* Default set of active tools that limits which tools the model can call,
|
|
375
375
|
* without changing the tool call and result types in the result.
|
|
@@ -705,7 +705,7 @@ type WorkflowAgentStreamOptions<TTools extends ToolSet = ToolSet, TRuntimeContex
|
|
|
705
705
|
* Condition for stopping the generation when there are tool results in the last step.
|
|
706
706
|
* When the condition is an array, any of the conditions can be met to stop the generation.
|
|
707
707
|
*/
|
|
708
|
-
stopWhen?: StopCondition<NoInfer<
|
|
708
|
+
stopWhen?: StopCondition<NoInfer<TTools>, TRuntimeContext> | Array<StopCondition<NoInfer<TTools>, TRuntimeContext>>;
|
|
709
709
|
/**
|
|
710
710
|
* The tool choice strategy. Default: 'auto'.
|
|
711
711
|
* Overrides the toolChoice from the constructor if provided.
|