之前也写过一篇关于cursor的文章,介绍了cursor的注册以及使用。
今天看到一篇博文,一个博主用cursor做了一个ios app,竟然排到了appstore榜单前20。
这点小事难不倒我,说干就干,咱今天就结合cursor +coze 智能体完成一个明星吐槽的微信小程序吧。

本文所有的内容只需要依赖cursor+微信开发工具两个软件即可。
我们首先要安装cursor软件,安装和注册地址基本上按照官方操作即可。
访问地址:https://www.cursor.com/

接下来下载微信小程序开发软件,去下面网站进行下载。
https://developers.weixin.qq.com/miniprogram/dev/devtools/download.html

coze 智能体确实可以干很多事情。下面智能体为输入用户名称,通过调用联网插件,最终将搜索的内容查询下来,再通过达模型做汇总总结。

接下来,就到了我们发布环节。将我们的智能体以API的形式发布。

此时要记得保存coze的token和botid,后面有用。

我们首先打开微信小程序工具,初始化一个项目,这里的初始化不选择模板。

接下来我们就会初始化一份文件,用cursor打开。
同时,新建一份intruction.md文件,文件输入具体的内容。我们需要将任务拆分成一步一步,这样cursor 才能更加直观理解我们的意思。

接下来,打开快捷键command+i。调取cursor自动生成界面,
输入“请按照instruction.md,输出具体的代码 ”


接下来,我们就接入coze api 。我们继续在cursor框输入一下内容:“点击按钮功能变为请求coze api的接口,返回的结果在显示区域显示。coze api 的说明文档是 。。。。”接下来把具体的coze api调用的接口说明文档也复制进去。
coze api接口参考地址:
https://www.coze.cn/docs/developer_guides/chat#11b88a68
cursor便会按照文档要求给我们输出正确的代码。

如果报错的话,或者按钮要调整的话,直接把内容到cursor的输入框中,都可以去优化代码。
就这样,基本上花了半个小时的时间,就把整个流程跑通了。

原文出自:https://mp.weixin.qq.com/s/7ImyUJCy2n96EswcMVbfAA