ExamQuestions.com

Register
Login
Microsoft Azure Exam Certification (AI-102) Exam Questions

Microsoft

Microsoft Azure Exam Certification (AI-102)

133 / 166

Question 133:

You have been tasked to add logic to your chatbot in order to prompt the user proactively when there is a price drop from the product that the user requested to monitor.Additionally, if there is a delay expected in the response, suggest the user to continue the conversation and notify the user when information is ready.In this process, the bot retrieves the conversation reference and calls the adapter method and turn context to send the proactive message. Review the code snippet below and complete by choosing the methods used to send the proactive message. (select two answer choices) 
<pre class="brush:java;">public async Task&lt;IActionResult&gt; Get()
{
foreach (var conversationReference in _conversationReferences.Values)
{
await ((BotAdapter)_adapter)..............................................(_appId, conversationReference, BotCallback, default(CancellationToken));
}
return new ContentResult()
{
Content = "&lt;html&gt;&lt;body&gt;&lt;h1&gt;Proactive messages sent.&lt;/h1&gt;&lt;/body&gt;&lt;/html&gt;",
ContentType = "text/html",
StatusCode = (int)HttpStatusCode.OK,
};
}
private async Task ………………………………………...(ITurnContext turnContext, CancellationToken cancellationToken)
{
await turnContext.SendActivityAsync("proactive message");
}
</pre> 

Answer options:

A.GetConversationReference
B.ContinueConversationAsync
C.BotCallback
D.OnConversationUpdateActivityAsync