exam questions

Exam AI-102 All Questions

View all questions & answers for the AI-102 exam

Exam AI-102 topic 5 question 42 discussion

Actual exam question from Microsoft's AI-102
Question #: 42
Topic #: 5
[All AI-102 Questions]

HOTSPOT
-

You have a chatbot.

You need to ensure that the bot conversation resets if a user fails to respond for 10 minutes.

How should you complete the code? To answer, select the appropriate options in the answer area.

NOTE: Each correct selection is worth one point.

Show Suggested Answer Hide Answer
Suggested Answer:

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
zellck
Highly Voted 1 year, 4 months ago
1. send_activity 2. clear_state https://learn.microsoft.com/en-us/azure/bot-service/bot-builder-howto-expire-conversation?view=azure-bot-service-4.0&tabs=python#user-interaction-expiration # Notify the user that the conversation is being restarted. - await turn_context.send_activity( # Clear state. - await self.conversation_state.clear_state(turn_context)
upvoted 22 times
rdemontis
1 year ago
thanks again for your contribution
upvoted 8 times
...
...
syupwsh
Most Recent 2 months, 3 weeks ago
send_activity is CORRECT because it is the method used to send a message to the user in the Bot Framework. In this context, it will be used to send the message "Welcome back! Let's start over from the beginning." clear_state is CORRECT because it is used to reset the state associated with the current conversation, effectively clearing any stored data and allowing the conversation to start over from the beginning.
upvoted 1 times
...
evangelist
9 months, 2 weeks ago
In summary, send_activities is the standard method for sending messages to users. on_send_activities is not typically used for sending messages directly. send_trace_activity is for debugging, and update_activity is for modifying existing messages.
upvoted 4 times
...
Tin_Tin
1 year, 4 months ago
The answer seems correct. https://learn.microsoft.com/en-us/azure/bot-service/bot-builder-howto-expire-conversation?view=azure-bot-service-4.0&tabs=python
upvoted 2 times
...
973b658
1 year, 4 months ago
It is true.
upvoted 2 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago