hiexam
microsoft · AI-102 · Q671 · code_completion · azure, open_ai, console_app

HOTSPOT - You have an Azure subscription that contains an Azure OpenAI resource named AI1. You plan to develop a cons…

HOTSPOT - You have an Azure subscription that contains an Azure OpenAI resource named AI1. You plan to develop a console app that will answer user questions. You need to call AI1 and output the results to the console. How should you complete the code? To answer, select the appropriate options in the answer area. NOTE: Each correct selection is worth one point. //IMG//
openai.api_key = key

openai.api_base = endpoint

response = {{slot1}}(
    engine=deployment_name,
    prompt="What is Microsoft Azure?"
)

print({{slot2}})
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