闲社服务运行正常AI智能体自动化平台
d

Dialogflow CX NLU管理

技能标识:dialogflow-cx-nlu

Manage intents and entity types in Google Dialogflow CX via REST API. Use for creating, updating, and managing natural language understanding components. Supports v3beta1 API.

作者:admin | 来源记录:ClawHub
登记来源
ClawHub
版本
V 1.0.0
检测标记
后台标记通过
免费
免费获取
0
收藏
来源与检测标记为平台登记信息,并不代表已展示可复核的检测报告。使用前请核对版本、依赖和所需权限,建议先在隔离环境中运行。
概述
安装方式
版本历史

Dialogflow CX NLU管理

Dialogflow CX NLU

通过REST API管理Google Dialogflow CX中的意图和实体类型,实现自然语言理解。

前提条件

  • - 已启用Dialogflow CX API的Google Cloud项目
  • 具有Dialogflow API访问权限的服务账号或OAuth凭据
  • 已认证的gcloud CLI或持有bearer令牌

身份认证

选项1:gcloud CLI(推荐)

bash gcloud auth application-default login TOKEN=$(gcloud auth print-access-token)

选项2:服务账号

bash export GOOGLEAPPLICATIONCREDENTIALS=/path/to/service-account.json TOKEN=$(gcloud auth application-default print-access-token)

API基础URL

https://dialogflow.googleapis.com/v3beta1

可用区域端点:

  • - https://{region}-dialogflow.googleapis.com(例如:us-central1、europe-west1)

常见操作

列出意图

bash curl -X GET \ https://dialogflow.googleapis.com/v3beta1/projects/${PROJECTID}/locations/${LOCATION}/agents/${AGENTID}/intents \ -H Authorization: Bearer ${TOKEN}

创建意图

bash curl -X POST \ https://dialogflow.googleapis.com/v3beta1/projects/${PROJECTID}/locations/${LOCATION}/agents/${AGENTID}/intents \ -H Authorization: Bearer ${TOKEN} \ -H Content-Type: application/json \ -d { displayName: 预订航班, trainingPhrases: [ { parts: [{text: 我想预订航班}], repeatCount: 1 } ] }

列出实体类型

bash curl -X GET \ https://dialogflow.googleapis.com/v3beta1/projects/${PROJECTID}/locations/${LOCATION}/agents/${AGENTID}/entityTypes \ -H Authorization: Bearer ${TOKEN}

创建实体类型

bash curl -X POST \ https://dialogflow.googleapis.com/v3beta1/projects/${PROJECTID}/locations/${LOCATION}/agents/${AGENTID}/entityTypes \ -H Authorization: Bearer ${TOKEN} \ -H Content-Type: application/json \ -d { displayName: 城市, kind: KIND_LIST, entities: [ {value: 纽约}, {value: 洛杉矶} ] }

关键资源

资源描述
意图对用户话语进行分类并提取参数
实体类型
定义结构化数据提取模式 |

快速参考

有关详细的API参考:

脚本

  • - scripts/nlu.py — 意图和实体类型操作的CLI封装

使用方法

bash python scripts/nlu.py list-intents --agent AGENT_NAME python scripts/nlu.py create-intent --agent AGENT_NAME --intent 预订航班 --phrases 预订航班,我想飞 python scripts/nlu.py list-entities --agent AGENT_NAME python scripts/nlu.py create-entity --agent AGENT_NAME --name 城市 --values 纽约,洛杉矶

提示

  • - 使用涵盖用户可能表达意图的各种方式的训练短语
  • 实体类型可以是系统(内置)或自定义
  • 对于带同义词的实体使用KINDMAP,对于简单列表使用KINDLIST

标签

skill ai

通过对话安装

以下为平台配置的接入选项,并非逐项实测通过。能否安装取决于客户端支持、技能来源和运行环境:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 dialogflow-cx-nlu-1776287949 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 dialogflow-cx-nlu-1776287949 技能

通过命令行安装

skillhub install dialogflow-cx-nlu-1776287949

下载

⬇ 下载 dialogflow-cx-nlu v1.0.0(免费)

文件大小: 5.58 KB | 发布时间: 2026-4-16 16:38

v1.0.0 最新 2026-4-16 16:38
Initial release of dialogflow-cx-nlu skill.

- Enables management of Dialogflow CX intents and entity types via REST API (v3beta1).
- Provides API usage examples for listing and creating intents and entity types.
- Includes authentication instructions for gcloud CLI and service accounts.
- Offers a CLI Python script for common NLU operations.
- Includes tips, quick references, and links to detailed documentation.
返回顶部