Skip to content

Commit e296bb4

Browse files
committed
retrieve resource info for JS and TS
1 parent 5e7169a commit e296bb4

18 files changed

+46
-180
lines changed

articles/ai-services/openai/includes/assistants-javascript.md

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -67,16 +67,7 @@ For _keyless_ authentication, you need to
6767

6868
## Retrieve resource information
6969

70-
#### [Microsoft Entra ID](#tab/keyless)
71-
72-
[!INCLUDE [keyless-environment-variables](env-var-without-key.md)]
73-
74-
75-
#### [API key](#tab/api-key)
76-
77-
[!INCLUDE [key-environment-variables](env-var-key.md)]
78-
79-
---
70+
[!INCLUDE [resource authentication](resource-auth.md)]
8071

8172
> [!CAUTION]
8273
> To use the recommended keyless authentication with the SDK, make sure that the `AZURE_OPENAI_API_KEY` environment variable isn't set.

articles/ai-services/openai/includes/assistants-typescript.md

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -66,23 +66,14 @@ For passwordless authentication, you need to
6666
```
6767

6868

69-
## Retrieve resource information
70-
71-
#### [Microsoft Entra ID](#tab/keyless)
72-
73-
[!INCLUDE [keyless-environment-variables](env-var-without-key.md)]
74-
7569

76-
#### [API key](#tab/api-key)
77-
78-
[!INCLUDE [key-environment-variables](env-var-key.md)]
70+
## Retrieve resource information
7971

80-
---
72+
[!INCLUDE [resource authentication](resource-auth.md)]
8173

8274
> [!CAUTION]
8375
> To use the recommended keyless authentication with the SDK, make sure that the `AZURE_OPENAI_API_KEY` environment variable isn't set.
8476
85-
8677
## Create an assistant
8778
8879
In our code we're going to specify the following values:

articles/ai-services/openai/includes/chatgpt-javascript.md

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,18 +24,10 @@ ms.date: 10/22
2424
- An Azure OpenAI Service resource with either a `gpt-35-turbo` or `gpt-4` series models deployed. For more information about model deployment, see the [resource deployment guide](../how-to/create-resource.md).
2525

2626

27-
## Retrieve resource information
28-
29-
#### [Microsoft Entra ID](#tab/keyless)
30-
31-
[!INCLUDE [keyless-environment-variables](env-var-without-key.md)]
32-
3327

34-
#### [API key](#tab/api-key)
35-
36-
[!INCLUDE [key-environment-variables](env-var-key.md)]
28+
## Retrieve resource information
3729

38-
---
30+
[!INCLUDE [resource authentication](resource-auth.md)]
3931

4032
> [!CAUTION]
4133
> To use the recommended keyless authentication with the SDK, make sure that the `AZURE_OPENAI_API_KEY` environment variable isn't set.

articles/ai-services/openai/includes/chatgpt-typescript.md

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -28,21 +28,11 @@ ms.date: 10/22
2828

2929
## Retrieve resource information
3030

31-
#### [Microsoft Entra ID](#tab/keyless)
32-
33-
[!INCLUDE [keyless-environment-variables](env-var-without-key.md)]
34-
35-
36-
#### [API key](#tab/api-key)
37-
38-
[!INCLUDE [key-environment-variables](env-var-key.md)]
39-
40-
---
31+
[!INCLUDE [resource authentication](resource-auth.md)]
4132

4233
> [!CAUTION]
4334
> To use the recommended keyless authentication with the SDK, make sure that the `AZURE_OPENAI_API_KEY` environment variable isn't set.
4435
45-
4636
## Create a Node application
4737

4838
In a console window (such as cmd, PowerShell, or Bash), create a new directory for your app, and navigate to it.

articles/ai-services/openai/includes/dall-e-javascript.md

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -24,19 +24,9 @@ Use this guide to get started generating images with the Azure OpenAI SDK for Ja
2424
- An Azure OpenAI resource created in a supported region (see [Region availability](/azure/ai-services/openai/concepts/models#model-summary-table-and-region-availability)). For more information, see [Create a resource and deploy a model with Azure OpenAI](../how-to/create-resource.md).
2525

2626

27-
2827
## Retrieve resource information
2928

30-
#### [Microsoft Entra ID](#tab/keyless)
31-
32-
[!INCLUDE [keyless-environment-variables](env-var-without-key.md)]
33-
34-
35-
#### [API key](#tab/api-key)
36-
37-
[!INCLUDE [key-environment-variables](env-var-key.md)]
38-
39-
---
29+
[!INCLUDE [resource authentication](resource-auth.md)]
4030

4131
> [!CAUTION]
4232
> To use the recommended keyless authentication with the SDK, make sure that the `AZURE_OPENAI_API_KEY` environment variable isn't set.

articles/ai-services/openai/includes/dall-e-typescript.md

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -25,25 +25,13 @@ Use this guide to get started generating images with the Azure OpenAI SDK for Ja
2525
- An Azure OpenAI resource created in a supported region (see [Region availability](/azure/ai-services/openai/concepts/models#model-summary-table-and-region-availability)). For more information, see [Create a resource and deploy a model with Azure OpenAI](../how-to/create-resource.md).
2626

2727

28-
29-
3028
## Retrieve resource information
3129

32-
#### [Microsoft Entra ID](#tab/keyless)
33-
34-
[!INCLUDE [keyless-environment-variables](env-var-without-key.md)]
35-
36-
37-
#### [API key](#tab/api-key)
38-
39-
[!INCLUDE [key-environment-variables](env-var-key.md)]
40-
41-
---
30+
[!INCLUDE [resource authentication](resource-auth.md)]
4231

4332
> [!CAUTION]
4433
> To use the recommended keyless authentication with the SDK, make sure that the `AZURE_OPENAI_API_KEY` environment variable isn't set.
4534
46-
4735
## Create a Node application
4836

4937
In a console window (such as cmd, PowerShell, or Bash), create a new directory for your app, and navigate to it. Then run the `npm init` command to create a node application with a _package.json_ file.

articles/ai-services/openai/includes/env-var-without-key.md

Lines changed: 0 additions & 15 deletions
This file was deleted.

articles/ai-services/openai/includes/gpt-v-javascript.md

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -31,22 +31,11 @@ This SDK is provided by OpenAI with Azure specific types provided by Azure.
3131

3232
## Retrieve resource information
3333

34-
#### [Microsoft Entra ID](#tab/keyless)
35-
36-
[!INCLUDE [keyless-environment-variables](env-var-without-key.md)]
37-
38-
39-
#### [API key](#tab/api-key)
40-
41-
[!INCLUDE [key-environment-variables](env-var-key.md)]
42-
43-
---
34+
[!INCLUDE [resource authentication](resource-auth.md)]
4435

4536
> [!CAUTION]
4637
> To use the recommended keyless authentication with the SDK, make sure that the `AZURE_OPENAI_API_KEY` environment variable isn't set.
4738
48-
49-
5039
## Create a Node application
5140

5241
In a console window (such as cmd, PowerShell, or Bash), create a new directory for your app, and navigate to it. Then run the `npm init` command to create a node application with a _package.json_ file.

articles/ai-services/openai/includes/gpt-v-typescript.md

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -31,22 +31,11 @@ This SDK is provided by OpenAI with Azure specific types provided by Azure.
3131

3232
## Retrieve resource information
3333

34-
#### [Microsoft Entra ID](#tab/keyless)
35-
36-
[!INCLUDE [keyless-environment-variables](env-var-without-key.md)]
37-
38-
39-
#### [API key](#tab/api-key)
40-
41-
[!INCLUDE [key-environment-variables](env-var-key.md)]
42-
43-
---
34+
[!INCLUDE [resource authentication](resource-auth.md)]
4435

4536
> [!CAUTION]
4637
> To use the recommended keyless authentication with the SDK, make sure that the `AZURE_OPENAI_API_KEY` environment variable isn't set.
4738
48-
49-
5039
## Create a Node application
5140

5241
In a console window (such as cmd, PowerShell, or Bash), create a new directory for your app, and navigate to it. Then run the `npm init` command to create a node application with a _package.json_ file.

articles/ai-services/openai/includes/javascript.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,18 +24,17 @@ ms.date: 10/22/2024
2424
- [Azure CLI](/cli/azure/install-azure-cli) used for passwordless authentication in a local development environment, create the necessary context by signing in with the Azure CLI.
2525
- An Azure OpenAI Service resource with the `gpt-35-turbo-instruct` model deployed. For more information about model deployment, see the [resource deployment guide](../how-to/create-resource.md).
2626

27+
## Retrieve resource information
2728

29+
[!INCLUDE [resource authentication](resource-auth.md)]
2830

29-
## Set up
31+
> [!CAUTION]
32+
> To use the recommended keyless authentication with the SDK, make sure that the `AZURE_OPENAI_API_KEY` environment variable isn't set.
3033
31-
[!INCLUDE [get-key-endpoint](get-key-endpoint.md)]
32-
33-
[!INCLUDE [environment-variables](environment-variables.md)]
34+
## Install the client library
3435

3536
In a console window (such as cmd, PowerShell, or Bash), create a new directory for your app, and navigate to it.
3637

37-
## Install the client library
38-
3938
Install the required packages for JavaScript with npm from within the context of your new directory:
4039

4140
```console

0 commit comments

Comments
 (0)