tencent cloud

Feedback

Text-driven Instructions

Last updated: 2024-07-19 10:14:37

Calling Protocol

HTTPS + JSON
POST /v2/ivh/interactdriver/interactdriverservice/command
Header Content-Type: application/json;charset=utf-8
Note:
The interval between sending texts must be greater than 1 second.

Request Parameters

Parameter name
Type
Required
Description
ReqId
String
Yes
Unique identifier for a single request.
SessionId
String
Yes
Unique identifier for the session.
Command
String
Yes
SEND_TEXT: Send text.
Data
Yes
Data Object
Data
(Send text.)
Name
Type
Required
Description
Text
string
No
The text content to be broadcasted, default value: "" The string with a maximum length of 4000.
Interrupt
boolean
No
Forced interruption flag. The default value is false. If forced interruption is not used and the text is marked as non-interruptible on the digital human platform, you will receive feedback indicating that interruption is not possible. If forced interruption is used, the system will ignore the non-interruptible setting on the digital human platform and execute the forced interruption directly.
ChatCommand
string
No
Dialogue instruction type, effective when the digital human project is bound to a customer service chat bot.
NotUseChat: The Q&A knowledge library configured for the customer service bot is not effective, and the digital human broadcasts the content sent.
Pass empty or do not pass: The Q&A knowledge library configured for the customer service bot becomes effective, and the digital human broadcasts the answers from the Q&A knowledge library.

Response Parameter

There is no need to pay attention to the returned content, just focus on the returned error code.

Request Sample

//Send the text message.
{
"Header": {},
"Payload": {
"SessionId": "m123",
"Command": "SEND_TEXT",
"Data": {
"Text": "Hello"
}
}
}
//After the customer service chat is bound, don't use the chat; broadcast the content that is sent.
{
"Header": {},
"Payload": {
"SessionId": "m123",
"Command": "SEND_TEXT",
"Data": {
"Text": "Hello",
"ChatCommand": "NotUseChat"//Using the text-driven stream built for the digital human project; this drive is purely text-driven and does not involve dialogue.
}
}
}

//Force interruption
{
"Header": {},
"Payload": {
"SessionId": "m123",
"Command": "SEND_TEXT",
"Data": {
"Interrupt": true
}
}
}

Response Sample

{
"Header": {
"Code": 0,
"Message": "",
"RequestID": "m123adfafvbadsafd",
}
}

Contact Us

Contact our sales team or business advisors to help your business.

Technical Support

Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

7x24 Phone Support