You are building a chatbot by using the Microsoft Bot Framework SDK

Posted by: Pdfprep Category: AI-102 Tags: , ,

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<UserProfile>(nameof (UserProfile));

var conversationStateAccessors =

_conversationState.CreateProperty<ConversationData>(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.

Answer:

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

Leave a Reply

Your email address will not be published.