Microsoft · AI-901
Chat client with the Foundry SDK
AI-901 · Lesson 6 of 10 · 40:14
YouTube loads only after you press play. This chapter opens at its timestamp in the full course. Watch on YouTube ↗
In this lesson
Prepare for the AI-901 exam (Microsoft Azure AI Fundamentals). In this lesson, a small Python chat client, step by step: installing azure-ai-projects (version 2), azure-identity and openai, signing in with az login (Microsoft Entra ID only), connecting with AIProjectClient and DefaultAzureCredential, get_openai_client, sending a request with responses.create (deployment name, system and user messages, output_text), keeping the conversation history, and the most common errors (sign-in, 403, 404, 429). Includes three original practice questions.
Preview the topics
- Which value goes in the endpoint parameter of AIProjectClient?
- A chat app answers “What is the largest country in Africa?” correctly, but for “What’s its capital?” it asks which country. What’s the fix?
- On a new laptop, the chat app fails with: “DefaultAzureCredential failed to retrieve a token”. What should the developer do first?