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/ai-foundry/foundry-models/how-to/use-chat-completions.md
+1-14Lines changed: 1 addition & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -44,7 +44,7 @@ For Azure OpenAI in Foundry Models, use the [Responses API](../../openai/support
44
44
In the following examples, you create the client to consume the model and then send a basic request to the model.
45
45
46
46
> [!NOTE]
47
-
> Use keyless authentication with Microsoft Entra ID. If that's not possible, use an API key and store it in Azure Key Vault. You can use an environment variable for testing outside of your Azure environments.
47
+
> Use keyless authentication with Microsoft Entra ID. If that's not possible, use an API key and store it in Azure Key Vault. You can use an environment variable for testing outside of your Azure environments. To learn more about keyless authentication, see [What is Microsoft Entra authentication?](/entra/identity/authentication/overview-authentication) and [DefaultAzureCredential](/azure/developer/python/sdk/authentication/overview#defaultazurecredential).
48
48
49
49
### Use the responses API
50
50
@@ -95,13 +95,6 @@ Microsoft Entra authentication only supports Azure OpenAI resources. Complete th
95
95
pip install azure-identity
96
96
```
97
97
98
-
1. Define an environment variable named `AZURE_TOKEN_CREDENTIALS`, and set it according to the environment in which the code runs:
99
-
- In Azure, set it to `ManagedIdentityCredential`.
100
-
> [!IMPORTANT]
101
-
> If you use a user-assigned managed identity, define an environment variable named `AZURE_CLIENT_ID`. Set it to the client ID of the managed identity. If you don't set that environment variable, `DefaultAzureCredential` assumes a system-assigned managed identity.
102
-
- In local development, set it to `dev`.
103
-
The Azure Identity library's `DefaultAzureCredential` reads this environment variable. For more information, see [Exclude a credential type category](/azure/developer/python/sdk/authentication/credential-chains?tabs=dac#exclude-a-credential-type-category).
104
-
105
98
1. Use the following code to configure the OpenAI client object, specify your deployment, and generate responses.
106
99
107
100
```python
@@ -162,12 +155,6 @@ Microsoft Entra authentication only supports Azure OpenAI resources. Complete th
162
155
```dotnetcli
163
156
dotnet add package Azure.Identity
164
157
```
165
-
1. Define an environment variable named `AZURE_TOKEN_CREDENTIALS`, and set it according to the environment in which the code runs:
166
-
- In Azure, set it to `ManagedIdentityCredential`.
167
-
> [!IMPORTANT]
168
-
> If you use a user-assigned managed identity, define an environment variable named `AZURE_CLIENT_ID`. Set it to the client ID of the managed identity. If you don't set that environment variable, `DefaultAzureCredential` assumes a system-assigned managed identity.
169
-
- In local development, set it to `dev`.
170
-
The Azure Identity library's `DefaultAzureCredential` reads this environment variable. For more information, see [Exclude a credential type category](/dotnet/azure/sdk/authentication/credential-chains?tabs=dac#exclude-a-credential-type-category).
171
158
172
159
1. Use the following code to configure the OpenAI client object, specify your deployment, and generate responses.
0 commit comments