问题描述
当用户在DialogFlow中回答问题时,是否有办法获得特定短语的置信度?示例:
问:德国的首都是什么?
答:柏林
When a user is responding to a question in DialogFlow, is there a way to obtain the confidence levels that was achieved for a specific phrase? Example:Q: What is the capital of Germany?A: Berlin
我想回想一下AI对用户的理解程度,例如:
I would like to read back how well the AI understood the user, e.g.:
他说:柏林 --->他说柏林的置信度为87.3%
He said: "Boerlin" ---> 87.3% confidence level that he said "Berlin"
有没有办法读回这种信息?
Is there a way to read back this kind of information?
推荐答案
托马斯。看看Google Apis DetectIntent文档。
Thomas. Have a look at the Google Apis DetectIntent Documentation.
使用方法如下:
POST https://dialogflow.googleapis.com/v2/projects/{DialogFlowProjectName}/agent/sessions/{SessionId}:detectIntent
正文:
{
"queryInput": {
"text": {
"text": "{Question You would like to ask}",
"languageCode": "en-EN"
}
}
}
它使用OAuth2.0,可以使用Google OAuth沙盒生成临时令牌来使用
It Uses OAuth2.0 you can use google OAuth Sandbox to generate a temporary token to usehttps://developers.google.com/oauthplayground/
在响应中将出现一个字段:
In the response there will be a field:
"intentDetectionConfidence": 0.6776556,
"intent": {
"name": "{IntentId}",
"displayName": "{IntentName}"
}
这篇关于如何确定DialogFlow的置信度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!