Home » Microsoft » AI-102 v.2 » HOTSPOT
HOTSPOT
You are building a chatbot by using the Microsoft Bot Framework SDK.
You use an object named UserProfile to store user profile information and an object named ConversationData to store information related to a conversation.
You create the following state accessors to store both objects in state. var userStateAccessors = _userState.CreateProperty(nameof(UserProfile)); var conversationStateAccessors = _conversationState.CreateProperty(nameof(ConversationData)); The state storage mechanism is set to Memory Storage.
For each of the following statements, select Yes if the statement is true. Otherwise, select No.
NOTE: Each correct selection is worth one point.
Hot Area:
Correct Answer:
Explanation/Reference:
Explanation:
Box 1: Yes
You create property accessors using the CreateProperty method that provides a handle to the BotState object. Each state property accessor allows you to get or set the value of the associated state property.
Box 2: Yes
Box 3: No
Before you exit the turn handler, you use the state management objects’ SaveChangesAsync() method to write all state changes back to storage.
Reference:
https://docs.microsoft.com/en-us/azure/bot-service/bot-builder-howto-v4-state