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 and Shabirmean committed Nov 15, 2022
1 parent ae30e45 commit 559b65d
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 559b65d

Please sign in to comment.