Course menuAI-901

Exams / AI-901 / Chat client apps with the Foundry SDK / Question 3

AI-901 practice question: Chat client apps with the Foundry SDK (3 of 4)

Implement AI solutions by using Microsoft Foundry A free question from our original AI-901 practice exam. Try it, then open the answer to see why each option is right or wrong.

Last verified against current Microsoft Learn ·How we write our questions

A boutique hotel's developer wrote the code below to ask its chat model about spa hours. The model was deployed to the project earlier under a name the developer chose.

openai_client = project.get_openai_client() response = openai_client.responses.create( model="spa-hours-chat", input="What time does the spa open on Sunday?", ) print(response.output_text)

What must the value of the model argument be?

Choose one answer.

  1. A. The resource group name that holds the hotel's Foundry resource
  2. B. The project endpoint URL, which ends with the project's name
  3. C. The deployment name of the model in the Foundry project
  4. D. The subscription ID of the Azure account that pays for the model
Show the answer and explanation

Answer: C

  • A. Wrong: Resource groups organize Azure resources for management and billing. The model argument does not take a resource group name, so this call would fail.
  • B. Wrong: The project endpoint is the address the client connects to, and it is set on AIProjectClient. The model argument names a deployment, not the endpoint.
  • C. Right: Correct. In the Foundry SDK, the model argument takes the deployment name you chose when you deployed the model, not a catalog name or version number.
  • D. Wrong: A subscription ID identifies the Azure account for billing. Passing it as the model argument would not select a deployed model.

Explanation

The model argument of responses.create takes the name of a deployment in the Foundry project. The endpoint, resource group and subscription each identify something else.

Study

Keep practicing

Answer questions with a score at the end, or practice just this topic with the explanation after each one. No sign-up needed.

Want more on Chat client apps with the Foundry SDK? The 5 full-length practice sets have 20 more Chat client apps with the Foundry SDK questions, 225 in all, none of them in the free exam. One payment of $9.99 $6.99, no subscription. Get the practice sets

Every exam starts with free questions. No account needed.