Skip to content

Commit

Permalink
samples: updated legacy field in detectintentknoledge (#569)
Browse files Browse the repository at this point in the history
  • Loading branch information
b-loved-dreamer authored May 24, 2021
1 parent 6e401a8 commit dc0045c
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,11 @@ public static Map<String, KnowledgeAnswers> detectIntentKnowledge(
System.out.format(
"Detected Intent: %s (confidence: %f)\n",
queryResult.getIntent().getDisplayName(), queryResult.getIntentDetectionConfidence());
System.out.format("Fulfillment Text: '%s'\n", queryResult.getFulfillmentText());
System.out.format(
"Fulfillment Text: '%s'\n",
queryResult.getFulfillmentMessagesCount() > 0
? queryResult.getFulfillmentMessages(0).getText()
: "Triggered Default Fallback Intent");
KnowledgeAnswers knowledgeAnswers = queryResult.getKnowledgeAnswers();
for (Answer answer : knowledgeAnswers.getAnswersList()) {
System.out.format(" - Answer: '%s'\n", answer.getAnswer());
Expand Down

0 comments on commit dc0045c

Please sign in to comment.