点击插件+号

点击创建插件

输入插件名称

然后添加工具,工具可以添加多个,名称必须是英文

在元数据中添加输入与输出,插件工具代码支持python与nodejs,我们以nodejs为例
然后在代码中修改,记得添加axios的依赖,使用axios请求自己的api服务器提供服务:
import { Args } from '@/runtime';
import { Input, Output } from "@/typings/find_codes/find_codes";
import axios from 'axios';
/**
* Each file needs to export a function named `handler`. This function is the entrance to the Tool.
* @param {Object} args.input - input parameters, you can get test input value by input.xxx.
* @param {Object} args.logger - logger instance used to print logs, injected by runtime
* @returns {*} The return data of the function, which should match the declared output parameters.
*
* Remember to fill in input/output in Metadata, it helps LLM to recognize and use tool.
*/
export async function handler({ input, logger }: Args<Input>): Promise<Output> {
// 发送一个GET请求
const response = await axios.post('https://www.bfw.wiki/', {
firstName: 'Fred',
lastName: 'Flintstone'
});
return {
codes: "您的代码链接:https://www.bfw.wiki/"+input.name,
};
};然后运行查看效果
最后点击发布,发布成功后
我们在插件中+号选择自己刚添加的插件局,然后问答中coze就会自动调用插件了。

网友回复
什么是Harness Engineering?
同一个中英混合文本不同大模型计算tokens长度一致吗?
Browser Use / Playwright / Puppeteer 与Chrome DevTools Protocol(CDP)的关系?
能否在三维空间调用ai的api实现vrm模型执行任意的姿势动作与行走完成任务?
如何让openclaw小龙虾自动帮你打电话聊客户?
各大公司推出的claw是否是为了大家消费自己的大模型tokens?
云服务器什么配置才能部署openclaw?
为啥ai生成视频模型只能5秒10秒或15秒生成,不能一次生成1分钟1i小时呢?
技术上如何解决被曝光的ai投毒geo行为?
有没有哪个大模型可以根据声音和文字描述生成带声音的视频?


