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

Dialogflow CX对话管理

技能标识:dialogflow-cx-conversations

Manage conversations and sessions in Google Dialogflow CX via REST API. Use for testing intents, handling user interactions, and managing conversation state. Supports v3beta1 API.

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

Dialogflow CX对话管理

Dialogflow CX 对话管理

通过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 POST \ https://dialogflow.googleapis.com/v3beta1/projects/${PROJECTID}/locations/${LOCATION}/agents/${AGENTID}/sessions/${SESSION_ID}:detectIntent \ -H Authorization: Bearer ${TOKEN} \ -H Content-Type: application/json \ -d { queryInput: { text: { text: Hello }, languageCode: en } }

匹配意图(不改变状态)

bash curl -X POST \ https://dialogflow.googleapis.com/v3beta1/projects/${PROJECTID}/locations/${LOCATION}/agents/${AGENTID}/sessions/${SESSION_ID}:matchIntent \ -H Authorization: Bearer ${TOKEN} \ -H Content-Type: application/json \ -d { queryInput: { text: { text: Hello }, languageCode: en } }

创建测试用例

bash curl -X POST \ https://dialogflow.googleapis.com/v3beta1/projects/${PROJECTID}/locations/${LOCATION}/agents/${AGENTID}/testCases \ -H Authorization: Bearer ${TOKEN} \ -H Content-Type: application/json \ -d { displayName: Greeting Test, testCaseConversationTurns: [ { userInput: { input: { text: { text: Hi } } }, virtualAgentOutput: { textResponses: [ { text: [Hello!] } ] } } ] }

关键资源

资源描述
会话具有状态的对话实例
检测意图
处理用户输入并获取响应 | | 测试用例 | 自动化对话测试 |

快速参考

详细的API参考文档:

脚本

  • - scripts/conversations.py — 对话操作的CLI封装

使用方法

bash python scripts/conversations.py detect-intent --agent AGENT_NAME --text Hello python scripts/conversations.py match-intent --agent AGENT_NAME --text Hello

提示

  • - 会话ID可以是任意唯一字符串(例如UUID)
  • 使用detectIntent进行完整对话流程,使用matchIntent进行不改变状态的测试
  • 测试用例有助于在部署前验证对话逻辑

标签

skill ai

通过对话安装

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

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 dialogflow-cx-conversations-1776291085 技能

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

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

通过命令行安装

skillhub install dialogflow-cx-conversations-1776291085

下载

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

文件大小: 4.5 KB | 发布时间: 2026-4-16 16:35

v1.0.0 最新 2026-4-16 16:35
Initial release of dialogflow-cx-conversations.

- Manage Dialogflow CX sessions and conversations via REST API (v3beta1)
- Includes authentication instructions for gcloud CLI and service accounts
- Provides curl samples for detectIntent, matchIntent, and test case creation
- Documents regional endpoints and required API setup
- Offers a Python CLI wrapper script for common operations
- Lists best practices and quick usage tips for session and conversation management
返回顶部