Skip to content

Commit

Permalink
Update PetStoreAssistantBot.java
Browse files Browse the repository at this point in the history
  • Loading branch information
chtrembl committed Jan 8, 2024
1 parent 862a7cd commit d01f2e0
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ public CompletableFuture<Void> onTurn(TurnContext turnContext) {
protected CompletableFuture<Void> onMessageActivity(TurnContext turnContext) {
String text = turnContext.getActivity().getText().toLowerCase().trim();

LOGGER.info("incoming text: " + text);

if (isErroneousRequest(text)) {
return null;
}
Expand Down Expand Up @@ -188,6 +190,8 @@ protected CompletableFuture<Void> onMessageActivity(TurnContext turnContext) {
return PetStoreAssistantUtilities.getImageCard(turnContext, dpResponse);
}

LOGGER.info("classificateion on text: " + text + " is: " + dpResponse.getClassification());

return turnContext.sendActivity(
MessageFactory.text(dpResponse.getDpResponseText())).thenApply(sendResult -> null);
}
Expand Down

0 comments on commit d01f2e0

Please sign in to comment.