Updated on 2024-10-12 GMT+08:00

/chatbot/rest/tuc/v1/recommendFaq

Function

FAQ recommendation interface.

The recommended knowledge list is matched based on the text in the request.

Input Parameters

Table 1

Parameter

Type

Mandatory (Yes/No)

Description

user

String

Yes

ID of the user who initiates the question.

sentence

String

Yes

Sentence that needs to match the recommended FAQ. The description cannot exceed 1024 characters.

language

String

Yes

Language.

The options are as follows:

  • en_US: English
  • ar: Arabic
  • es_ES: Spanish
  • zh_CN: Chinese
  • fr_FR: French

threshold

Double

No

FAQ confidence threshold.

Default value: 0. If the value is a number, the system returns only the FAQs whose confidence is greater than the value.

Output Parameters

Parameter

Type

Description

recommends

List [FaqAnswer]

Returned FAQ result set.

FaqAnswer is described as follows.

Parameter

Type

Description

faqGroupId

Integer

FAQ group ID.

faqGroupName

String

FAQ group name.

faqId

Integer

FAQ ID.

question

String

Question.

answers

List <String>

Answer list.

prob

Double

Confidence. The value is a probability greater than 0.

Request Example

{
    "user": "${user}",
    "sentence": "${sentence}",
    "language": "${language}",
    "threshold": "${threshold}
}