hiexam
microsoft · AI-102 · Q293 · code_completion · azure, cognitive_search, chat_app

Complete the following code snippet to correctly configure Azure Cognitive Search in a chat application.

Complete the following code snippet to correctly configure Azure Cognitive Search in a chat application.
var options = new {{slot1}}();
Messages = {
    new ChatMessage(ChatRole.User, "What are the differences between Azure Machine Learning and Azure AI services?"),
},
AzureExtensionsOptions = new AzureChatExtensionsOptions()
{
    Extensions =
    {
        new {{slot2}}()
        {
            SearchEndpoint = new Uri(searchEndpoint),
            SearchKey = new AzureKeyCredential(searchKey),
            IndexName = searchIndex,
        }
    }
};
Correct slot values

Answer hidden

Unlock AI-102

First 5 questions of every exam are free. Unlock the rest.

Includes
  • · All — questions
  • · Verified answers + AI explanations
  • · Spaced-repetition mistake notebook
  • · Phone, tablet, laptop sync

One-time payment. Doesn't auto-renew. · Already paid? Sign in