exam questions

Exam AI-102 All Questions

View all questions & answers for the AI-102 exam

Exam AI-102 topic 7 question 10 discussion

Actual exam question from Microsoft's AI-102
Question #: 10
Topic #: 7
[All AI-102 Questions]

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.

Show Suggested Answer Hide Answer
Suggested Answer:

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
rookiee1111
Highly Voted 10 months, 2 weeks ago
Given answer is correct 1) chatcompletion.create - this is the API for creating chat completion 2) response.choices[0].text - for picking the text with highest rated response choice
upvoted 6 times
...
syupwsh
Most Recent 2 months, 2 weeks ago
openai.ChatCompletion.create is CORRECT because this method is used to create a chat completion request with the OpenAI model, which is suitable for generating responses to user questions in a conversational format. (response.choices[0].text) is CORRECT because this accesses the text of the first choice in the response from the chat completion API call, which contains the answer generated by the model.
upvoted 2 times
...
testmaillo020
8 months ago
Answer is correct
upvoted 1 times
...
carcasgon
1 year ago
Correct. Under Completions > Example response https://learn.microsoft.com/en-us/azure/ai-services/openai/reference#completions
upvoted 4 times
...
Murtuza
1 year, 1 month ago
# Output the response to the console print(response.choices[0].message.content) response = client.chat.completions.create( The given answers are CORRECT
upvoted 3 times
...
GHill1982
1 year, 1 month ago
Answer is correct.
upvoted 2 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago