文档

RecognizeIntention - 意图识别

更新时间:

意图识别,支持意图识别(全局+分层)、态度识别、企业识别。

接口说明

请确保在使用该接口前,已充分了解通义点金产品的收费方式和价格。

前提条件

已开通 百炼服务和通义点金服务。

获取到 workspaceId:获取 workspace 标识

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

授权信息

当前API暂无授权信息透出。

请求语法

POST /{workspaceId}/api/recog/intent HTTP/1.1

请求参数

名称类型必填描述示例值
workspaceIdstring

业务空间 id

llm-xxxx
bodyobject

请求体。

analysisboolean

是否分析

false
bizTypestring

业务类型。

枚举值:
  • common意图识别
  • business企业识别
  • attitude态度识别
common
conversationstring

对话内容。

##客服##:您好,请问是朱杰先生吗?这里是诚信财务的周莉。我们发现您有一项款项昨天是账单日,但您还没还款,这很可能是一个小小的疏忽。来电是提醒您尽快完成还款,避免影响您的信用记录。\n ##客户##:今天天气怎么样呢?
globalIntentionListarray<object>

全局意图列表,当操作类型 opType 为分层 hierarchical 时,必填。

globalIntentionListobject

全局意图

descriptionstring

意图描述

正常付款3
intentionstring

意图名称

正常付款3
intentionCodestring

意图 code

1810566978021232640
hierarchicalIntentionListarray<object>

分层意图列表,当操作类型 opType 为分层 hierarchical 时,必填。

hierarchicalIntentionListobject

分层意图

descriptionstring

意图描述

询问股票价格
intentionstring

意图名称

询问股票价格
intentionCodestring

意图 code

1810929291010150400
intentionListarray<object>

意图列表,当业务类型不为态度识别时,必填。

intentionListobject

意图

descriptionstring

意图描述

客户表示忘记还款
intentionstring

意图名称

客户表示忘记还款
intentionCodestring

意图 code

1808766224000262144
opTypestring

操作类型。

枚举值:
  • common通用
  • hierarchical分层
common
recommendboolean

推荐意图

false

返回参数

名称类型描述示例值
object

ResultCode

costlong

耗时

null
dataobject

响应数据

analysisProcessstring

分析过程

客户回答的内容与提供的意图列表描述均不匹配,没有表达出对账单、还款、天气或其他服务的具体需求或问题。
intentionCodestring

意图 code

1
intentionNamestring

意图名称

其它
recommendIntentionstring

推荐意图

客户试图回避谈论逾期还款的话题
recommendScriptstring

推荐话术

朱先生,理解您可能对天气感兴趣,但更重要的是您的账户情况。请让我们专注于您未偿还的款项,这对您的信用健康至关重要。
dataTypestring

数据类型

null
errCodestring

错误码

0
messagestring

错误信息

ok
requestIdstring

请求 id

003D019A-1BB3-53EC-A0D2-CE76DA5D73B1
successboolean

是否成功

true
timestring

时间戳

2024-04-24 11:54:34

示例

正常返回示例

JSON格式

{
  "cost": 0,
  "data": {
    "analysisProcess": "客户回答的内容与提供的意图列表描述均不匹配,没有表达出对账单、还款、天气或其他服务的具体需求或问题。",
    "intentionCode": "1",
    "intentionName": "其它",
    "recommendIntention": "客户试图回避谈论逾期还款的话题",
    "recommendScript": "朱先生,理解您可能对天气感兴趣,但更重要的是您的账户情况。请让我们专注于您未偿还的款项,这对您的信用健康至关重要。"
  },
  "dataType": "null",
  "errCode": "0",
  "message": "ok",
  "requestId": "003D019A-1BB3-53EC-A0D2-CE76DA5D73B1",
  "success": true,
  "time": "2024-04-24 11:54:34"
}

错误码

访问错误中心查看更多错误码。