docs: fix ts error in math examples (#18244)
This commit is contained in:
@@ -59,7 +59,7 @@ export const add = tool({
|
|||||||
b: tool.schema.number().describe("Second number"),
|
b: tool.schema.number().describe("Second number"),
|
||||||
},
|
},
|
||||||
async execute(args) {
|
async execute(args) {
|
||||||
return args.a + args.b
|
return (args.a + args.b).toString()
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -70,7 +70,7 @@ export const multiply = tool({
|
|||||||
b: tool.schema.number().describe("Second number"),
|
b: tool.schema.number().describe("Second number"),
|
||||||
},
|
},
|
||||||
async execute(args) {
|
async execute(args) {
|
||||||
return args.a * args.b
|
return (args.a * args.b).toString()
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
```
|
```
|
||||||
|
|||||||
Reference in New Issue
Block a user