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

Semantic Recognition Interface

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

Description

This interface is invoked to obtain the matching status of an intention template.

Interface Method

POST

URL

https://IP:PORT/oifde/rest/api/speechrecognition

Request

Table 1 Parameters in the request body

Parameter

Type

Position

Mandatory

Description

userId

String

Body

Yes

User ID.

The value can contain a maximum of 64 characters.

sentence

String

Body

Yes

Text information entered by a customer.

The value can contain a maximum of 1024 characters.

tenantId

String

Body

Yes

Tenant ID.

The value can contain a maximum of 64 characters.

language

String

Body

Yes

Language. The options are as follows:

  • zh_CN: Chinese
  • en_US: English
  • es_ES: Spanish
  • ar: Arabic
  • th_TH: Thai
  • pt_BR: Portuguese
  • fr_FR: French

targetIntentCount

String

Body

No

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

String

Body

No

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

The value ranges from 0 to 1.

context

String

Body

No

Context required for intention recognition. Only one context can be transferred.

To use the context, configure a single context based on the intention.

The value can contain a maximum of 128 characters.

domainList

List <String>

Body

No

IDs of activated domains.

A maximum of 100 IDs are allowed.

faqGroupList

List <String>

Body

No

IDs of activated FAQ groups.

A maximum of 100 IDs are allowed.

authToken

String

Body

Yes

Valid token value for accessing the interface.

You can obtain the valid token information by invoking the interface for obtaining tokens.

For details, see C3 OIAP Interface Authentication.

The value can contain a maximum of 32 characters.

Response

Table 2 Parameters in the response body

Parameter

Type

Position

Mandatory

Description

errorCode

Integer

Body

Yes

Error code.

The value 0 indicates success and other values indicates failure.

errorMessage

String

Body

No

Error message.

intentsResponses

intentsResponses[]

Body

No

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

Table 3 intentsResponses

Parameter

Type

Position

Mandatory

Description

responses

String[]

Body

No

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

confidence

Float

Body

Yes

Confidence.

commands

String[]

Body

Yes

Intention command word.

commandParams

Map

Body

No

Keyword parameters. The slot information of general intentions is returned through this parameter.

Example: {"Number":"3"}

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

scenarioName

String

Body

No

Intention name.

scenarioStatus

String

Body

No

Scenario status.

simQuestions

List <String>

Body

No

If a similar question exists in the FAQ question, the similar question is returned. (Similar questions refer to questions other than the matched main question.)

Example

  • Request
    {
    	"userId": "1649209493813571405",
    	"sentence": "Query the call fee.",
    	"tenantId": "202205125916",
    	"language": "en_US",
    	"targetIntentCount": "2",
    	"confidence2Top": "0.5",
    	"authToken": "Xun4*******************yAmResnf",
            "context":"Query the call fee.",
            "domainList":[10039],
            "faqGroupList":[10952,10950]
    }
  • Response
    {
        "intentsResponses": [
            {
                "scenarioStatus": "finish",
                "confidence": 1.0,
                "responses": "Dear user, your call fee balance is CNY56.",
                "scenarioName": "Call fee query",
                "commands": "Query the call fee."
            }
        ],
        "errorCode": 0
    }
  • Request (including FAQs)
    {
    	"userId": "1649209493813571405",
    	"sentence": "Preferential package recommendation",
    	"tenantId": "202205125916",
    	"language": "en_US",
    	"targetIntentCount": "2",
    	"confidence2Top": "0.5",
    	"authToken": "Xun4vb*******************mResnf",
            "context":"",
            "domainList":[10039],
            "faqGroupList":[10952,10950]
    }
  • Response
    {
        "intentsResponses": [
            {
                "simQuestions": [
                    "Some preferential traffic packages are available."
                ],
                "scenarioStatus": "SUCCESS",
                "confidence": 23.0,
                "responses": "A monthly discount is available, CNY10 for 3 GB traffic.",
                "scenarioName": "1721756338",
                "commands": "systemQA"
            }
        ],
        "errorCode": 0
    }

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