summaryrefslogtreecommitdiffhomepage
path: root/packages/plugin/src/example.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/plugin/src/example.ts')
-rw-r--r--packages/plugin/src/example.ts8
1 files changed, 4 insertions, 4 deletions
diff --git a/packages/plugin/src/example.ts b/packages/plugin/src/example.ts
index fd6a404d9..1e4557a68 100644
--- a/packages/plugin/src/example.ts
+++ b/packages/plugin/src/example.ts
@@ -5,15 +5,15 @@ export const ExamplePlugin: Plugin = async (ctx) => {
return {
permission: {},
tool: {
- mytool: tool((zod) => ({
+ mytool: tool({
description: "This is a custom tool tool",
args: {
- foo: zod.string(),
+ foo: tool.schema.string().describe("foo"),
},
- async execute(args, ctx) {
+ async execute(args) {
return `Hello ${args.foo}!`
},
- })),
+ }),
},
async "chat.params"(_input, output) {
output.topP = 1