mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-16 19:04:37 +00:00
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:
parent
568150f18b
commit
4c9c453646
3 changed files with 58 additions and 26 deletions
|
|
@ -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 },
|
||||
};
|
||||
},
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue