Skip to content

Commit 2c560e4

Browse files
authored
Merge pull request #96625 from aahill/patch-23
[CogSvcs] Adding environment variable instructions
2 parents ceecd8e + f7d3e46 commit 2c560e4

File tree

2 files changed

+81
-2
lines changed

2 files changed

+81
-2
lines changed

articles/cognitive-services/LUIS/sdk-csharp-quickstart-authoring-app.md

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,51 @@ Use the Language Understanding (LUIS) authoring client library for .NET to:
2929
* Language Understanding (LUIS) portal account - [Create one for free](https://www.luis.ai)
3030
* The current version of [.NET Core](https://dotnet.microsoft.com/download/dotnet-core).
3131

32+
3233
## Setting up
3334

3435
### Get your Language Understanding (LUIS) starter key
3536

36-
Get your [starter key](luis-how-to-azure-subscription.md#starter-key), and [create an environment variable](https://docs.microsoft.com/azure/cognitive-services/cognitive-services-apis-create-account#configure-an-environment-variable-for-authentication) for the key, named `COGNITIVESERVICE_AUTHORING_KEY`.
37+
Get your [starter key](luis-how-to-azure-subscription.md#starter-key) by creating a LUIS authoring resource. Keep your key, and the region of the key for the next step.
38+
39+
### Create an environment variable
40+
41+
Using your key, and the region for the key, create two environment variables for authentication:
42+
43+
* `COGNITIVESERVICE_AUTHORING_KEY` - The resource key for authenticating your requests.
44+
* `COGNITIVESERVICE_REGION` - The region associated with your key. For example `westus`.
45+
46+
Use the instructions for your operating system.
47+
48+
#### [Windows](#tab/windows)
49+
50+
```console
51+
setx COGNITIVESERVICE_AUTHORING_KEY <replace-with-your-authoring-key>
52+
setx COGNITIVESERVICE_REGION <replace-with-your-authoring-region>
53+
```
54+
55+
After you add the environment variable, restart the console window.
56+
57+
#### [Linux](#tab/linux)
58+
59+
```bash
60+
export COGNITIVESERVICE_AUTHORING_KEY=<replace-with-your-authoring-key>
61+
export COGNITIVESERVICE_REGION=<replace-with-your-authoring-region>
62+
```
63+
64+
After you add the environment variable, run `source ~/.bashrc` from your console window to make the changes effective.
65+
66+
#### [macOS](#tab/unix)
67+
68+
Edit your `.bash_profile`, and add the environment variable:
69+
70+
```bash
71+
export COGNITIVESERVICE_AUTHORING_KEY=<replace-with-your-authoring-key>
72+
export COGNITIVESERVICE_REGION=<replace-with-your-authoring-region>
73+
```
74+
75+
After you add the environment variable, run `source .bash_profile` from your console window to make the changes effective.
76+
***
3777

3878
### Create a new C# application
3979

articles/cognitive-services/LUIS/sdk-python-quickstart-authoring-app.md

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,46 @@ Use the Language Understanding (LUIS) authoring client library for Python to:
3333

3434
### Get your Language Understanding (LUIS) starter key
3535

36-
Get your [starter key](luis-how-to-azure-subscription.md#starter-key), and [create an environment variable](https://docs.microsoft.com/azure/cognitive-services/cognitive-services-apis-create-account#configure-an-environment-variable-for-authentication) for the key, named `LUIS_AUTHORING_KEY` and an environment variable for the region of the key, `LUIS_REGION`.
36+
Get your [starter key](luis-how-to-azure-subscription.md#starter-key) by creating a LUIS authoring resource. Keep your key, and the region of the key for the next step.
37+
38+
### Create an environment variable
39+
40+
Using your key, and the region for the key, create two environment variables for authentication:
41+
42+
* `LUIS_AUTHORING_KEY` - The resource key for authenticating your requests.
43+
* `LUIS_REGION` - The region associated with your key. For example `westus`.
44+
45+
Use the instructions for your operating system.
46+
47+
#### [Windows](#tab/windows)
48+
49+
```console
50+
setx LUIS_AUTHORING_KEY <replace-with-your-luis-authoring-key
51+
setx LUIS_REGION <replace-with-your-luis-region>
52+
```
53+
54+
After you add the environment variable, restart the console window.
55+
56+
#### [Linux](#tab/linux)
57+
58+
```bash
59+
export LUIS_AUTHORING_KEY=<replace-with-your-luis-authoring-key>
60+
export LUIS_REGION=<replace-with-your-luis-region>
61+
```
62+
63+
After you add the environment variable, run `source ~/.bashrc` from your console window to make the changes effective.
64+
65+
#### [macOS](#tab/unix)
66+
67+
Edit your `.bash_profile`, and add the environment variable:
68+
69+
```bash
70+
export LUIS_AUTHORING_KEY=<replace-with-your-luis-authoring-key>
71+
export LUIS_REGION=<replace-with-your-luis-region>
72+
```
73+
74+
After you add the environment variable, run `source .bash_profile` from your console window to make the changes effective.
75+
***
3776

3877
### Install the Python library for LUIS
3978

0 commit comments

Comments
 (0)