Get Your CertMicrosoft Applied Skills: Develop a Generative AI Chat App Using the Microsoft Foundry SDKPlayCompete
‹ All Microsoft Applied Skills: Develop a Generative AI Chat App Using the Microsoft Foundry SDK questions

Microsoft Foundry Generative AI Chat App Practice Question 5: Foundry SDK Package Version

Microsoft Applied Skills: Develop a Generative AI Chat App Using the Microsoft Foundry SDK · Test 1 · question 5 of 10

Create a chat app by using the Microsoft Foundry SDKmedium

You are setting up a Python environment for a chat app that targets a project created in the new Microsoft Foundry portal. The project endpoint has the form https://<resource-name>.services.ai.azure.com/api/projects/<project-name>, and the app will sign in with DefaultAzureCredential. Which packages should you install?

Select one answer
Show answer and explanation

Answer:

  • A. azure-ai-projects version 2.x together with azure-identity

The Foundry SDK is the thin-client SDK that exposes the Foundry project APIs through a single project endpoint, and the Python package version table maps SDK 2.x to the Foundry (new) portal: pip install "azure-ai-projects>=2.0.0". azure-identity supplies DefaultAzureCredential, which the samples use for Microsoft Entra ID authentication.

- B is wrong because azure-ai-projects 1.x is the version for Foundry (classic) projects. The documentation warns that 2.x code "is incompatible with Azure AI Projects 1.x," so pinning 1.0.0 against a new-portal project endpoint is the wrong branch. - C is wrong because azure-mgmt-cognitiveservices is the management-plane library used to create Foundry resources and projects, not to call models, and it is not the Foundry SDK that the project endpoint is designed around. - D is wrong because the OpenAI SDK targets the https://<resource-name>.openai.azure.com/openai/v1 endpoint, not the /api/projects/ project endpoint. In the Foundry SDK pattern you obtain the OpenAI-compatible client from the project client instead.

Reference: Get started with Microsoft Foundry SDKs and endpoints

Practice Test 1 ›