hiexam
microsoft · AI-102 · Q290 · code_completion · openai_api, chat_completion, python

Complete the code snippet to correctly configure the OpenAI ChatCompletion API.

Complete the code snippet to correctly configure the OpenAI ChatCompletion API.
response = openai.ChatCompletion.create(
    engine="dgw-aoai-gpt35",
    messages = [{"role": "{{slot1}}", "content": ""}],
    {{slot2}} = 1,
    max_tokens=800,
    stop=None
)
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