Introduction to Building a Chat Client
Connecting a Python application to a Foundry project with the Foundry SDK and Microsoft Entra ID, and calling a deployed model with the Responses API in a multi-turn chat.
- 2 lessons
- Module quiz
A chat client is the simplest Foundry application: it sends a user's message to a deployed model and shows the response. In Python, it connects to a project with the Foundry SDK, the azure-ai-projects package, authenticates with DefaultAzureCredential instead of a key, and calls the model through the Responses API.
Because a model keeps no memory between requests, a chat client must also manage conversation context, by resending history, linking to the previous response or using a stored conversation.
What the exam expects
Questions test the package and credential used, the model parameter being the deployment name, how multi-turn context is kept, and handling errors such as HTTP 429 when the rate limit is exceeded.
How this module is organized
Connecting to Foundry from Python with Keyless Authentication explains the packages, endpoint and authentication, and Building a Chat Client with the Responses API explains the request, the response and conversation context.