Skip to content

Commit 0c44c9a

Browse files
committed
Fixed the tool options being passed to metadata in ai.tool
1 parent 4995e16 commit 0c44c9a

File tree

1 file changed

+2
-2
lines changed
  • packages/trigger-sdk/src/v3

1 file changed

+2
-2
lines changed

packages/trigger-sdk/src/v3/ai.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,12 @@ function toolFromTask<
3838
);
3939
}
4040

41-
const serializedOptions = options ? JSON.parse(JSON.stringify(options)) : undefined;
42-
4341
return tool({
4442
description: task.description,
4543
parameters: convertTaskSchemaToToolParameters(task.schema),
4644
execute: async (args, options) => {
45+
const serializedOptions = options ? JSON.parse(JSON.stringify(options)) : undefined;
46+
4747
return await task
4848
.triggerAndWait(args, {
4949
metadata: {

0 commit comments

Comments
 (0)