Skip to content

Commit 7e2aa6d

Browse files
committed
edits
1 parent f64e7ad commit 7e2aa6d

File tree

5 files changed

+56
-84
lines changed

5 files changed

+56
-84
lines changed

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

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

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

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,36 @@ ms.custom: devex-track-js, devex-track-typescript
1212
| `ENDPOINT` | This value can be found in the **Keys and Endpoint** section when examining your resource from the Azure portal. Alternatively, you can find the value in **Azure OpenAI Studio** > **Playground** > **View code**. An example endpoint is: `https://docs-test-001.openai.azure.com/`.|
1313
| `API-KEY` | This value can be found in the **Keys and Endpoint** section when examining your resource from the Azure portal. You can use either `KEY1` or `KEY2`.|
1414
| `DEPLOYMENT-NAME` | This value will correspond to the custom name you chose for your deployment when you deployed a model. This value can be found under **Resource Management** > **Model Deployments** in the Azure portal or alternatively under **Management** > **Deployments** in Azure OpenAI Studio.|
15+
| `OPENAI_API_VERSION`|Learn more about [API Versions](/azure/ai-services/openai/concepts/model-versions).|
1516

1617
Go to your resource in the Azure portal. The **Keys and Endpoint** can be found in the **Resource Management** section. Copy your endpoint and access key as you'll need both for authenticating your API calls. You can use either `KEY1` or `KEY2`. Always having two keys allows you to securely rotate and regenerate keys without causing a service disruption.
1718

1819
:::image type="content" source="../media/quickstarts/endpoint.png" alt-text="Screenshot of the overview blade for an OpenAI Resource in the Azure portal with the endpoint & access keys location circled in red." lightbox="../media/quickstarts/endpoint.png":::
1920

20-
[!INCLUDE [environment-variables](environment-variables.md)]
21+
22+
# [Command Line](#tab/command-line)
23+
24+
```cmd
25+
setx AZURE_OPENAI_ENDPOINT "REPLACE_WITH_YOUR_ENDPOINT_HERE"
26+
setx AZURE_OPENAI_KEY "REPLACE_WITH_YOUR_API_KEY_HERE"
27+
setx AZURE_OPENAI_DEPLOYMENT_NAME "REPLACE_WITH_YOUR_DEPLOYMENT_NAME"
28+
setx OPENAI_API_VERSION "REPLACE_WITH_YOUR_API_VERSION"
29+
```
30+
31+
# [PowerShell](#tab/powershell)
32+
33+
```powershell
34+
[System.Environment]::SetEnvironmentVariable('AZURE_OPENAI_ENDPOINT', 'REPLACE_WITH_YOUR_ENDPOINT_HERE', 'User')
35+
[System.Environment]::SetEnvironmentVariable('AZURE_OPENAI_KEY', 'REPLACE_WITH_YOUR_API_KEY_HERE', 'User')
36+
[System.Environment]::SetEnvironmentVariable('AZURE_OPENAI_DEPLOYMENT_NAME', 'REPLACE_WITH_YOUR_DEPLOYMENT_NAME', 'User')
37+
[System.Environment]::SetEnvironmentVariable('OPENAI_API_VERSION', 'REPLACE_WITH_YOUR_API_VERSION', 'User')
38+
```
39+
40+
# [Bash](#tab/bash)
41+
42+
```bash
43+
export AZURE_OPENAI_ENDPOINT="REPLACE_WITH_YOUR_ENDPOINT_HERE"
44+
export AZURE_OPENAI_KEY="REPLACE_WITH_YOUR_API_KEY_HERE"
45+
export AZURE_OPENAI_DEPLOYMENT_NAME="REPLACE_WITH_YOUR_DEPLOYMENT_NAME"
46+
export OPENAI_API_VERSION="REPLACE_WITH_YOUR_API_VERSION"
47+
```

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

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,31 @@ ms.custom: devex-track-js, devex-track-typescript
99
---
1010
|Variable name | Value |
1111
|--------------------------|-------------|
12-
| `RESOURCE_NAME` | This value can be found in the Azure portal for the Azure OpenAI resource.
1312
| `ENDPOINT` | This value can be found in the **Keys and Endpoint** section when examining your resource from the Azure portal. Alternatively, you can find the value in **Azure OpenAI Studio** > **Playground** > **View code**. An example endpoint is: `https://docs-test-001.openai.azure.com/`.|
1413
| `DEPLOYMENT-NAME` | This value will correspond to the custom name you chose for your deployment when you deployed a model. This value can be found under **Resource Management** > **Model Deployments** in the Azure portal or alternatively under **Management** > **Deployments** in Azure OpenAI Studio.|
14+
| `OPENAI_API_VERSION`|Learn more about [API Versions](/azure/ai-services/openai/concepts/model-versions).|
1515

16-
[!INCLUDE [environment-variables](environment-variables-without-keys.md)]
16+
# [Command Line](#tab/command-line)
17+
18+
```cmd
19+
setx AZURE_OPENAI_ENDPOINT "REPLACE_WITH_YOUR_ENDPOINT_HERE"
20+
setx AZURE_OPENAI_DEPLOYMENT_NAME "REPLACE_WITH_YOUR_DEPLOYMENT_NAME"
21+
setx OPENAI_API_VERSION "REPLACE_WITH_YOUR_API_VERSION"
22+
```
23+
24+
# [PowerShell](#tab/powershell)
25+
26+
```powershell
27+
[System.Environment]::SetEnvironmentVariable('AZURE_OPENAI_ENDPOINT', 'REPLACE_WITH_YOUR_ENDPOINT_HERE', 'User')
28+
[System.Environment]::SetEnvironmentVariable('AZURE_OPENAI_DEPLOYMENT_NAME', 'REPLACE_WITH_YOUR_DEPLOYMENT_NAME', 'User')
29+
[System.Environment]::SetEnvironmentVariable('OPENAI_API_VERSION', 'REPLACE_WITH_YOUR_API_VERSION', 'User')
30+
```
31+
32+
# [Bash](#tab/bash)
33+
34+
```bash
35+
export AZURE_OPENAI_ENDPOINT="REPLACE_WITH_YOUR_ENDPOINT_HERE"
36+
export AZURE_OPENAI_DEPLOYMENT_NAME="REPLACE_WITH_YOUR_DEPLOYMENT_NAME"
37+
export OPENAI_API_VERSION="REPLACE_WITH_YOUR_API_VERSION"
38+
```
1739

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

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ author: mrbullwinkle
77
ms.author: mbullwin
88
ms.service: azure-ai-openai
99
ms.topic: include
10-
ms.date: 05/30/2024
10+
ms.date: 10/09/2024
1111
ms.custom: passwordless-js, devex-track-javascript
1212
---
1313

@@ -72,22 +72,21 @@ To successfully make a call against the Azure OpenAI service, set environment va
7272
#### [TypeScript keyless (Recommended)](#tab/typescript-keyless)
7373
7474
[!INCLUDE [assistants-keyless-environment-variables](assistants-env-var-without-key.md)]
75-
[!INCLUDE [environment-variables-deployment](assistants-env-var-additional.md)]
75+
7676
7777
#### [TypeScript with API key](#tab/typescript-key)
7878
7979
[!INCLUDE [assistants-key-environment-variables](assistants-env-var-key.md)]
80-
[!INCLUDE [environment-variables-deployment](assistants-env-var-additional.md)]
80+
8181
8282
#### [JavaScript keyless](#tab/javascript-keyless)
8383
8484
[!INCLUDE [assistants-keyless-environment-variables](assistants-env-var-without-key.md)]
85-
[!INCLUDE [environment-variables-deployment](assistants-env-var-additional.md)]
85+
8686
8787
#### [JavaScript with API key](#tab/javascript-key)
8888
8989
[!INCLUDE [assistants-key-environment-variables](assistants-env-var-key.md)]
90-
[!INCLUDE [environment-variables-deployment](assistants-env-var-additional.md)]
9190
9291
> [!CAUTION]
9392
> Don't set `AZURE_OPENAI_KEY` when using keyless authentication.

articles/ai-services/openai/includes/environment-variables-without-keys.md

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

0 commit comments

Comments
 (0)