# Rich text answer explaination
NLU Result Return Fieldanswer
forstring
Type, with the exception of text-type responses, all types of responses can be resolved by JSON.parse toobject
Come check it out
# Plain text type
{
"answer": "Hello, how can I help you?"
}
# Text Type (with Recommended Questions)
{
"answer": " We have not found the corresponding answer, we will deal with it as soon as possible. Official Official Account message template: weixin Dialogue Open Platform <a href="weixin://bizmsgmenu? msgmenucontent=How many degrees in Beijing today&msgmenuid=How much degree in Beijing Today">How much is Beijing today?</a>"
}
# Text type (including hyperlinks)
{
"answer": " Please go to<a href="https://chatbot.weixin.qq.com/">openai</a>To configure "
}
# H5
JSON.parse as shown below(answer)The data structure after that
{
"news": {
"articles": [{
"title": "Real Time Update: New Pneumonia Epidemic Update,"
"description": "Tencent News synchronized the national new pneumonia epidemic situation in the first time, welcome attention, forward,"
"url": "https://news.qq.com/zt2020/page/feiyan.htm",
"picurl": "http://mmbiz.qpic.cn/mmbiz_jpg/W3gQtpV3j8D8kZRqfpTJlfVqubwgFQf47H0GWlGV6leaDF80ZpdtuFhQVsCsM3YKmwkujXzdjR2k6aWfA41ic7Q/0?wx_fmt=jpeg",
"type": "h5"
}]
}
}
The fields of each item in the News.articles array are described as:
field | type | describe |
---|---|---|
title | string | Title of article |
description | string | Article Description |
url | string | Article Links |
picurl | string | Photo Links |
type | string | Indicates the type of the article, there are 'h5' and' mp' two, mp indicates the Official Account message template article, h5 indicates the configuration of the open platform in the dialogue h5 |
# Official Account message template picture
JSON.parse as shown below(answer)The data structure after that
{
"image": {
"media_id": "KegpipQG9t-klMo25My4e4BCZFcmKvgMcpMFAkC-VFE",
"url": "http://mmbiz.qpic.cn/mmbiz_jpg/W3gQtpV3j8Bax22dhRiccWAb2AtVjal28XmqnhDW22dMn3RA5EoGkpolMO3tD9kQC1Hf9AjEJI66K40xQsNtXgQ/0?wx_fmt=jpeg"
}
}
Each field in the image is described as:
field | type | describe |
---|---|---|
media_id | string | Official Account message template ID |
url | string | Official Account message template Image url |
# Mini Program
JSON.parse as shown below(answer)The data structure after that
{
"miniprogrampage": {
"title": "openai dialog plugin,"
"appid": "wx8c631f7e9f2465e1",
"pagepath": "pages/index/index",
"thumb_media_id": "KegpipQG9t-klMo25My4e8zpBjhjg3JMrMSpgjikB4U",
"thumb_url": "http://mmbiz.qpic.cn/mmbiz_png/W3gQtpV3j8BYhWgfHT5Hfg6auN94c2ec4BBhDOMtPQrx6vEMc1rR4iaDKxDLOfZ1jBUqIEEY4YpvEj6ktSyXT7g/0?wx_fmt=png"
}
}
Each field in miniprogrampage is described as:
field | type | describe |
---|---|---|
title | string | Small Program Title |
appid | string | appid |
pagepath | string | Mini Program Jump Page Path |
thumb_media_id | string | Official Account message template ID |
thumb_url | string | Official Account message template Image url |
# Combined answer
JSON.parse as shown below(answer)The data structure after that
{
"multimsg": []
}
field | type | describe |
---|---|---|
multimsg | array | The answer list is merged, each entry is a collection of single types, each type refers to its corresponding data structure |