exam questions

Exam AI-102 All Questions

View all questions & answers for the AI-102 exam

Exam AI-102 topic 7 question 11 discussion

Actual exam question from Microsoft's AI-102
Question #: 11
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
syupwsh
2 months, 2 weeks ago
GetCompletions is CORRECT because this method is used to get a completion response from the OpenAI model for a given prompt. In this case, the prompt is "What is Microsoft Azure?" and you want the model to generate a text response to this question. (response.Value.Choices[0].Text); is CORRECT because this property accesses the generated text response from the OpenAI model. This is what you need to print to the console to display the answer to the user's question.
upvoted 1 times
...
rookiee1111
10 months, 1 week ago
1. GetCompletions - this is the api for creating chat. 2. (response.Value.Choises[0].Text) - this will output the text from top rated response object.
upvoted 4 times
...
taiwan_is_not_china
11 months ago
1. GetCompletions 2. (response.Value.Choises[0].Text);
upvoted 3 times
...
Murtuza
1 year, 1 month ago
Agree answer is correct
upvoted 4 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