# 使用 AI 辅助生成智能体

该接口方法需要安装 AI智能体应用,如未安装需要前往安装才可以使用

# 接口英文名

ai_bot_ai_generate_bot

# 调用方式

# 云能力初始化

参考 使用指南-接口方式调用-云能力初始化 部分

# 调用接口

可以通过callFunction调用云模板提供的接口

wx.cloud.callFunction({
  name: 'cloudbase_module',
  data: {
    name: 'ai_bot_ai_generate_bot',
    data: {
      simple: true,
      prompt: "小程序开发专家"
    },
  },
  success: (res) => {
    console.log(res)
  },
});

# 入参:

参数 类型 必填 描述
simple boolean 是否只生成功能描述
prompt string 智能体的名称或者功能描述

# 出参:

参数 类型 描述
result object
result.setting string 智能体的设定提示词
requestId string 请求ID