Skip to content

Commit 5e7169a

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

16 files changed

+141
-242
lines changed

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

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

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

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

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

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,16 +64,17 @@ For _keyless_ authentication, you need to
6464
npm install @azure/identity
6565
```
6666

67+
6768
## Retrieve resource information
6869

69-
#### [Microsoft Entra ID](#tab/javascript-keyless)
70+
#### [Microsoft Entra ID](#tab/keyless)
7071

71-
[!INCLUDE [assistants-keyless-environment-variables](assistants-env-var-without-key.md)]
72+
[!INCLUDE [keyless-environment-variables](env-var-without-key.md)]
7273

7374

74-
#### [API key](#tab/javascript-key)
75+
#### [API key](#tab/api-key)
7576

76-
[!INCLUDE [assistants-key-environment-variables](assistants-env-var-key.md)]
77+
[!INCLUDE [key-environment-variables](env-var-key.md)]
7778

7879
---
7980

@@ -98,7 +99,7 @@ An individual assistant can access up to 128 tools including `code interpreter`,
9899

99100
## Create a new JavaScript application
100101

101-
#### [Microsoft Entra ID](#tab/javascript-keyless)
102+
#### [Microsoft Entra ID](#tab/keyless)
102103

103104
1. Create the `index.js` file with the following code:
104105

@@ -205,7 +206,7 @@ An individual assistant can access up to 128 tools including `code interpreter`,
205206
206207
207208
208-
#### [API key](#tab/javascript-key)
209+
#### [API key](#tab/api-key)
209210
210211
1. Create the `index.js` file with the following code:
211212

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,17 +65,17 @@ For passwordless authentication, you need to
6565
npm install @azure/identity
6666
```
6767

68-
## Retrieve resource information
6968

69+
## Retrieve resource information
7070

71-
#### [Microsoft Entra ID](#tab/typescript-keyless)
71+
#### [Microsoft Entra ID](#tab/keyless)
7272

73-
[!INCLUDE [assistants-keyless-environment-variables](assistants-env-var-without-key.md)]
73+
[!INCLUDE [keyless-environment-variables](env-var-without-key.md)]
7474

7575

76-
#### [API key](#tab/typescript-key)
76+
#### [API key](#tab/api-key)
7777

78-
[!INCLUDE [assistants-key-environment-variables](assistants-env-var-key.md)]
78+
[!INCLUDE [key-environment-variables](env-var-key.md)]
7979

8080
---
8181

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

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,22 @@ 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-
## Set up
27+
## Retrieve resource information
2828

29-
[!INCLUDE [get-key-endpoint](get-key-endpoint.md)]
29+
#### [Microsoft Entra ID](#tab/keyless)
30+
31+
[!INCLUDE [keyless-environment-variables](env-var-without-key.md)]
32+
33+
34+
#### [API key](#tab/api-key)
35+
36+
[!INCLUDE [key-environment-variables](env-var-key.md)]
37+
38+
---
39+
40+
> [!CAUTION]
41+
> To use the recommended keyless authentication with the SDK, make sure that the `AZURE_OPENAI_API_KEY` environment variable isn't set.
3042
31-
[!INCLUDE [environment-variables](environment-variables.md)]
3243

3344
## Create a Node application
3445

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

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,22 @@ ms.date: 10/22
2626
- An Azure OpenAI Service resource with 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).
2727

2828

29+
## Retrieve resource information
2930

30-
## Set up
31+
#### [Microsoft Entra ID](#tab/keyless)
3132

32-
[!INCLUDE [get-key-endpoint](get-key-endpoint.md)]
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+
---
41+
42+
> [!CAUTION]
43+
> To use the recommended keyless authentication with the SDK, make sure that the `AZURE_OPENAI_API_KEY` environment variable isn't set.
3344
34-
[!INCLUDE [environment-variables](environment-variables.md)]
3545

3646
## Create a Node application
3747

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

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,22 @@ 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-
## Setup
2827

29-
[!INCLUDE [get-key-endpoint](get-key-endpoint.md)]
28+
## Retrieve resource information
3029

31-
[!INCLUDE [environment-variables](environment-variables.md)]
30+
#### [Microsoft Entra ID](#tab/keyless)
3231

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+
---
40+
41+
> [!CAUTION]
42+
> To use the recommended keyless authentication with the SDK, make sure that the `AZURE_OPENAI_API_KEY` environment variable isn't set.
3343
3444
## Create a Node application
3545

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

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,22 @@ Use this guide to get started generating images with the Azure OpenAI SDK for Ja
2626

2727

2828

29-
## Setup
3029

31-
[!INCLUDE [get-key-endpoint](get-key-endpoint.md)]
30+
## Retrieve resource information
3231

33-
[!INCLUDE [environment-variables](environment-variables.md)]
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+
---
42+
43+
> [!CAUTION]
44+
> To use the recommended keyless authentication with the SDK, make sure that the `AZURE_OPENAI_API_KEY` environment variable isn't set.
3445
3546

3647
## Create a Node application

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

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,26 @@ This SDK is provided by OpenAI with Azure specific types provided by Azure.
2525

2626
---
2727

28-
2928
> [!NOTE]
3029
> This library is maintained by OpenAI. Refer to the [release history](https://github.com/openai/openai-node/releases) to track the latest updates to the library.
3130
32-
[!INCLUDE [get-key-endpoint](get-key-endpoint.md)]
3331

34-
[!INCLUDE [environment-variables](environment-variables.md)]
32+
## Retrieve resource information
33+
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+
---
44+
45+
> [!CAUTION]
46+
> To use the recommended keyless authentication with the SDK, make sure that the `AZURE_OPENAI_API_KEY` environment variable isn't set.
47+
3548

3649

3750
## Create a Node application

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

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,23 @@ This SDK is provided by OpenAI with Azure specific types provided by Azure.
2828
> [!NOTE]
2929
> This library is maintained by OpenAI. Refer to the [release history](https://github.com/openai/openai-node/releases) to track the latest updates to the library.
3030
31-
[!INCLUDE [get-key-endpoint](get-key-endpoint.md)]
3231

33-
[!INCLUDE [environment-variables](environment-variables.md)]
32+
## Retrieve resource information
33+
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+
---
44+
45+
> [!CAUTION]
46+
> To use the recommended keyless authentication with the SDK, make sure that the `AZURE_OPENAI_API_KEY` environment variable isn't set.
47+
3448

3549

3650
## Create a Node application

0 commit comments

Comments
 (0)