Update CHANGELOG, README, and custom-tools.md for new CustomTool API
- Add custom tools API rework to CHANGELOG breaking changes - Update docs/custom-tools.md with new types and signatures - Update README quick example with correct execute signature
This commit is contained in:
@@ -659,10 +659,11 @@ const factory: CustomToolFactory = (pi) => ({
|
||||
name: Type.String({ description: "Name to greet" }),
|
||||
}),
|
||||
|
||||
async execute(toolCallId, params) {
|
||||
async execute(toolCallId, params, signal, onUpdate, ctx) {
|
||||
const { name } = params as { name: string };
|
||||
return {
|
||||
content: [{ type: "text", text: `Hello, ${params.name}!` }],
|
||||
details: { greeted: params.name },
|
||||
content: [{ type: "text", text: `Hello, ${name}!` }],
|
||||
details: { greeted: name },
|
||||
};
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user