Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive

Business Request Interface

Updated on 2023-09-27 GMT+08:00

Description

1. When this interface is invoked for the first time, the nonce information required for authentication can be obtained.

2. After the interface authentication is successful, this interface can be invoked to obtain the intention template matching status from the third-party system.

Interface Method

POST

URL

/chatbot/u-route/api/router_service/recognize

Parameters in the request header

Parameter

Mandatory

Type

Description

Content-Type

Yes

String

application/json;charset=utf-8

Chatbot-Token

Yes

String

Token returned by the authentication interface.

Request

Table 1 Parameters in the request body

Parameter

Mandatory

Type

Description

request

Yes

requestBody

Request body.

Table 2 requestBody

Parameter

Mandatory

Type

Length

Description

userId

Yes

String

64

User ID.

accesscode

No

String

32

Access code (number that a user dials to access the system).

channel

No

String

32

Channel. (Currently, the value is fixed at OIFDE.)

sentence

Yes

String

1024

Text information entered by a customer.

tenantId

Yes

String

64

Tenant ID.

language

Yes

String

20

Language.

zh_CN: Chinese

en_US: English

context

No

String

64

Context required for intent recognition.

targetIntentCount

No

Integer

4

Number of intentions returned by the chatbot when multiple intentions are required. Generally, this parameter is used when a customer enters one sentence to match multiple intentions.

The value ranges from 1 to 5.

confidence2Top

No

Float

4

Confidence interval.

If multiple intentions are returned, the confidence interval between the subsequent intentions and the first intention with the highest confidence is required. A smaller value indicates a closer proximity between the returned intentions.

The value ranges from 0 to 1.

timeZone

No

String

10

Time zone. The value 8 indicates GMT+8.

Response Parameters

Parameter

Mandatory

Type

Length

Description

errorMsg

No

String

512

Error message.

errorCode

No

String

20

Error code.

intentsResponses

No

Intents[]

-

Intention array, which must be returned when the operation is successful.

nonce

No

String

128

Character string randomly generated by the server. This parameter is returned when the token authentication fails and the status code 401 is also returned.

Table 3 Intents

Parameter

Mandatory

Type

Length

Description

responses

No

String[]

4096

Response returned by the chatbot. The value is a character string array. Multiple values are allowed.

confidence

Yes

Float

4

Confidence.

  • Confidence of the chatbot reply. The value ranges from 0 to 1. For example, if 10 answers are provided for question 1 and six of them are answer 1, the confidence of answer 1 is 0.6.

commands

Yes

String[]

64

Intention command word.

params

No

Map

-

Keyword parameters. The slot information of general intentions is returned through this parameter. An example is {"Number":"3"}.

For details about operations related to general intentions, see Adding Intention Templates.

scenarioName

No

String

64

Intention name.

scenarioType

No

Integer

4

Scenario type.

1: auxiliary scenario

0: business scenario

–1: no scenario

scenarioStatus

No

String

64

Scenario status (not used currently).

Example

  • Request
{
"request":
{
"sentence": "Query the bill of March.",
"targetIntentCount":1,
"confidence2Top":0.2,
"accessCode": "10086",
"channel":"OIFDE",
"tenantId":"NJ_001",
"language":"en_US",
"userId":"123456789"
}
}
  • Successful response
{
"errorCode":"0",
"errorMsg":"",
"intentsResponses":
[
{
"responses":[""],
"confidence":1.0,
"commands":["bill"],
"params":{"Number":"3"},
"scenarioName":"query bills",
"scenarioType":"normal",
"scenarioStatus":"finish"
}
]
}
  • Failed response
401 Unauthorized
{
"errorMsg":"NEED_LOGIN","nonce":"0cf*******************accesaf"
}

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback