Skip to content

Commit

Permalink
samples: updated legacy field in detectintenttexts (#572)
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 c8f2ec8 commit f600a8c
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,11 @@ public static Map<String, QueryResult> detectIntentTexts(
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");

queryResults.put(text, queryResult);
}
Expand Down

0 comments on commit f600a8c

Please sign in to comment.