You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/azure-app-configuration/quickstart-chat-completion-python.md
+15-14Lines changed: 15 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ ms.devlang: python
9
9
ms.custom: devx-track-python, mode-other
10
10
ms.topic: quickstart
11
11
ms.tgt_pltfrm: Python
12
-
ms.date: 03/04/2026
12
+
ms.date: 03/11/2026
13
13
ms.update-cycle: 180-days
14
14
ms.author: mametcal
15
15
ms.collection: ce-skilling-ai-copilot
@@ -40,7 +40,7 @@ The full sample source code is available in the [Azure App Configuration GitHub
40
40
```console
41
41
pip install azure-appconfiguration-provider
42
42
pip install azure-identity
43
-
pip install azure-ai-inference
43
+
pip install azure-ai-projects
44
44
```
45
45
46
46
1. Create a file named `app.py` and add the following import statements:
@@ -49,7 +49,7 @@ The full sample source code is available in the [Azure App Configuration GitHub
49
49
import os
50
50
from azure.appconfiguration.provider import load, SettingSelector, WatchKey
51
51
from azure.identity import DefaultAzureCredential
52
-
from azure.ai.inference import ChatCompletionsClient
52
+
from azure.ai.projects import AIProjectClient
53
53
```
54
54
55
55
1. Create a functionto load configuration from Azure App Configuration.
@@ -101,18 +101,18 @@ The full sample source code is available in the [Azure App Configuration GitHub
101
101
102
102
1. Create the main functionthat configures the chat client and runs the chat loop.
103
103
104
-
Create an instance of the `ChatCompletionsClient` to connect to your Azure AI Foundry project. You use `DefaultAzureCredential` to authenticate. Assign the **Cognitive Services OpenAI User** role to the identity represented by `DefaultAzureCredential`. For detailed steps, refer to the [Role-based access control for Azure OpenAI service](/azure/ai-services/openai/how-to/role-based-access-control) guide. Be sure to allow sufficient timefor the permission to propagate before running your application.
104
+
Create an instance of the `AIProjectClient` to connect to your Azure AI Foundry project. You use `DefaultAzureCredential` to authenticate. Assign the **Cognitive Services OpenAI User** role to the identity represented by `DefaultAzureCredential`. For detailed steps, refer to the [Role-based access control for Azure OpenAI service](/azure/ai-services/openai/how-to/role-based-access-control) guide. Be sure to allow sufficient timefor the permission to propagate before running your application.
105
105
106
106
```python
107
107
def main():
108
108
config = load_azure_app_configuration()
109
109
110
-
# Create a chat client using Microsoft Entra ID
111
-
client = ChatCompletionsClient(
110
+
# Create a project client using Microsoft Entra ID
0 commit comments