Skip to content

Commit 431ec48

Browse files
committed
fix
1 parent e02a8c8 commit 431ec48

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

articles/ai-foundry/model-inference/includes/code-create-chat-client-entra.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ client = ChatCompletionsClient(
2626
endpoint="https://<resource>.services.ai.azure.com/models",
2727
credential=DefaultAzureCredential(),
2828
credential_scopes=["https://cognitiveservices.azure.com/.default"],
29-
model="mistral-large-2407",
3029
)
3130
```
3231

@@ -50,7 +49,6 @@ const clientOptions = { credentials: { "https://cognitiveservices.azure.com" } }
5049
const client = new ModelClient(
5150
"https://<resource>.services.ai.azure.com/models",
5251
new DefaultAzureCredential(),
53-
"mistral-large-2407",
5452
clientOptions,
5553
);
5654
```
@@ -80,15 +78,14 @@ using Azure.AI.Inference;
8078
Then, you can use the package to consume the model. The following example shows how to create a client to consume chat completions with Entra ID:
8179

8280
```csharp
83-
var credential = new DefaultAzureCredential();
81+
TokenCredential credential = new DefaultAzureCredential();
8482
AzureAIInferenceClientOptions clientOptions = new AzureAIInferenceClientOptions();
8583
BearerTokenAuthenticationPolicy tokenPolicy = new BearerTokenAuthenticationPolicy(credential, new string[] { "https://cognitiveservices.azure.com/.default" });
8684
clientOptions.AddPolicy(tokenPolicy, HttpPipelinePosition.PerRetry);
8785

8886
ChatCompletionsClient client = new ChatCompletionsClient(
8987
new Uri("https://<resource>.services.ai.azure.com/models"),
9088
credential,
91-
"mistral-large-2407",
9289
clientOptions.
9390
);
9491
```
@@ -117,7 +114,6 @@ TokenCredential defaultCredential = new DefaultAzureCredentialBuilder().build();
117114
ChatCompletionsClient client = new ChatCompletionsClientBuilder()
118115
.credential(defaultCredential)
119116
.endpoint("https://<resource>.services.ai.azure.com/models")
120-
.model("mistral-large-2407")
121117
.buildClient();
122118
```
123119

0 commit comments

Comments
 (0)