Skip to content

Commit c4f6929

Browse files
committed
update azure portal endpoint
1 parent d4cdd5a commit c4f6929

File tree

7 files changed

+69
-69
lines changed

7 files changed

+69
-69
lines changed

articles/ai-services/language-service/question-answering/how-to/authoring.md

Lines changed: 56 additions & 56 deletions
Large diffs are not rendered by default.

articles/ai-services/language-service/question-answering/how-to/export-import-refresh.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ The update sources example in the [Authoring API docs](./authoring.md#update-sou
7575

7676
|Variable name | Value |
7777
|--------------------------|-------------|
78-
| `ENDPOINT` | This value can be found in the **Keys & Endpoint** section when examining your resource from the Azure portal. Alternatively you can find the value in **Language Studio** > **question answering** > **Deploy project** > **Get prediction URL**. An example endpoint is: `https://southcentralus.api.cognitive.microsoft.com/`. If this was your endpoint in the following code sample, you would only need to add the region-specific portion of `southcentral` as the rest of the endpoint path is already present.|
78+
| `ENDPOINT` | This value can be found in the **Keys & Endpoint** section when examining your resource from the Azure portal. Alternatively you can find the value in **Language Studio** > **question answering** > **Deploy project** > **Get prediction URL**. An example endpoint is: `https://southcentralus.cognitiveservices.azure.com/`. If this was your endpoint in the following code sample, you would only need to add the region-specific portion of `southcentral` as the rest of the endpoint path is already present.|
7979
| `API-KEY` | This value can be found in the **Keys & Endpoint** section when examining your resource from the Azure portal. You can use either Key1 or Key2. Always having two valid keys allows for secure key rotation with zero downtime. Alternatively you can find the value in **Language Studio** > **question answering** > **Deploy project** > **Get prediction URL**. The key value is part of the sample request.|
8080
| `PROJECT-NAME` | The name of project where you would like to update sources.|
8181

@@ -90,7 +90,7 @@ curl -X PATCH -H "Ocp-Apim-Subscription-Key: {API-KEY}" -H "Content-Type: applic
9090
"refresh": "true"
9191
}
9292
}
93-
]' -i 'https://{ENDPOINT}.api.cognitive.microsoft.com/language/query-knowledgebases/projects/{PROJECT-NAME}/sources?api-version=2021-10-01'
93+
]' -i 'https://{ENDPOINT}.cognitiveservices.azure.com/language/query-knowledgebases/projects/{PROJECT-NAME}/sources?api-version=2021-10-01'
9494
```
9595

9696
## Export questions and answers

articles/ai-services/language-service/question-answering/how-to/prebuilt.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Below is an example of a sample request:
3030
## Sample request
3131

3232
```
33-
POST https://{Unique-to-your-endpoint}.api.cognitive.microsoft.com/language/:query-text
33+
POST https://{Unique-to-your-endpoint}.cognitiveservices.azure.com/language/:query-text
3434
```
3535

3636
### Sample query over a single block of text

articles/ai-services/language-service/question-answering/includes/rest.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ To [query a custom question answering project](/rest/api/questionanswering/quest
3232

3333
|Variable name | Value |
3434
|--------------------------|-------------|
35-
| `Endpoint` | This value can be found in the **Keys & Endpoint** section when examining your resource from the Azure portal. Alternatively you can find the value in **Language Studio** > **question answering** > **Deploy project** > **Get prediction URL**. An example endpoint is: `https://southcentralus.api.cognitive.microsoft.com/`|
35+
| `Endpoint` | This value can be found in the **Keys & Endpoint** section when examining your resource from the Azure portal. Alternatively you can find the value in **Language Studio** > **question answering** > **Deploy project** > **Get prediction URL**. An example endpoint is: `https://southcentralus.cognitiveservices.azure.com/`|
3636
| `API-Key` | This value can be found in the **Keys & Endpoint** section when examining your resource from the Azure portal. You can use either Key1 or Key2. Always having two valid keys always for secure key rotation with zero downtime. Alternatively you can find the value in **Language Studio** > **question answering** > **Deploy project** > **Get prediction URL**. The key value is part of the sample request.|
3737
| `Project` | The name of your custom question answering project.|
3838
| `Deployment` | There are two possible values: `test`, and `production`. `production` is dependent on you having deployed your project from **Language Studio** > **question answering** > **Deploy project**.|
@@ -42,7 +42,7 @@ The cURL command is executed from a BASH shell. Edit this command with your own
4242
```bash
4343
curl -X POST -H "Ocp-Apim-Subscription-Key: $LANGUAGE_KEY" -H "Content-Type: application/json" -d '{
4444
"question": "How much battery life do I have left?"
45-
}' '$LANGUAGE_ENDPOINT.api.cognitive.microsoft.com/language/:query-knowledgebases?projectName={YOUR_PROJECT_NAME}&api-version=2021-10-01&deploymentName={DEPLOYMENT_NAME}'
45+
}' '$LANGUAGE_ENDPOINT.cognitiveservices.azure.com/language/:query-knowledgebases?projectName={YOUR_PROJECT_NAME}&api-version=2021-10-01&deploymentName={DEPLOYMENT_NAME}'
4646
```
4747

4848
When you run the code above, if you are using the data source from the prerequisites you will get an answer that looks as follows:
@@ -76,7 +76,7 @@ If you want to exclude answers where the confidence score falls below a certain
7676
curl -X POST -H "Ocp-Apim-Subscription-Key: $LANGUAGE_KEY" -H "Content-Type: application/json" -d '{
7777
"question": "How much battery life do I have left?",
7878
"confidenceScoreThreshold": "0.95",
79-
}' '$LANGUAGE_ENDPOINT.api.cognitive.microsoft.com//language/:query-knowledgebases?projectName=Sample-project&api-version=2021-10-01&deploymentName={DEPLOYMENT_NAME}'
79+
}' '$LANGUAGE_ENDPOINT.cognitiveservices.azure.com//language/:query-knowledgebases?projectName=Sample-project&api-version=2021-10-01&deploymentName={DEPLOYMENT_NAME}'
8080
```
8181

8282
Since we know from our previous execution of the code that our confidence score is: `.9185` setting the threshold to `.95` will result in the [default answer](../how-to/change-default-answer.md) being returned.
@@ -111,7 +111,7 @@ curl -X POST -H "Ocp-Apim-Subscription-Key: $LANGUAGE_KEY" -H "Content-Type: app
111111
{"id":"doc2","text":"You can use the USB port on your Surface Pro 4 power supply to charge other devices, like a phone, while your Surface charges. The USB port on the power supply is only for charging, not for data transfer. If you want to use a USB device, plug it into the USB port on your Surface."}],
112112
"language":"en",
113113
"stringIndexType":"Utf16CodeUnit"
114-
}' '$LANGUAGE_ENDPOINT.api.cognitive.microsoft.com/language/:query-text?&api-version=2021-10-01'
114+
}' '$LANGUAGE_ENDPOINT.cognitiveservices.azure.com/language/:query-text?&api-version=2021-10-01'
115115
```
116116

117117
This example will return a result of:

articles/ai-services/language-service/question-answering/includes/sdk-csharp.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ You will need to update the code below and provide your own values for the follo
7979

8080
|Variable name | Value |
8181
|--------------------------|-------------|
82-
| `endpoint` | This value can be found in the **Keys & Endpoint** section when examining your resource from the Azure portal. Alternatively you can find the value in **Language Studio** > **question answering** > **Deploy project** > **Get prediction URL**. An example endpoint is: `https://southcentralus.api.cognitive.microsoft.com/`|
82+
| `endpoint` | This value can be found in the **Keys & Endpoint** section when examining your resource from the Azure portal. Alternatively you can find the value in **Language Studio** > **question answering** > **Deploy project** > **Get prediction URL**. An example endpoint is: `https://southcentralus.cognitiveservices.azure.com/`|
8383
| `credential` | This value can be found in the **Keys & Endpoint** section when examining your resource from the Azure portal. You can use either Key1 or Key2. Always having two valid keys always for secure key rotation with zero downtime. Alternatively you can find the value in **Language Studio** > **question answering** > **Deploy project** > **Get prediction URL**. The key value is part of the sample request.|
8484
| `projectName` | The name of your custom question answering project.|
8585
| `deploymentName` | There are two possible values: `test`, and `production`. `production` is dependent on you having deployed your project from **Language Studio** > **question answering** > **Deploy project**.|
@@ -198,7 +198,7 @@ namespace questionansweringcsharp
198198
static void Main(string[] args)
199199
{
200200

201-
Uri endpoint = new Uri("https://{YOUR-ENDPOINT}.api.cognitive.microsoft.com/");
201+
Uri endpoint = new Uri("https://{YOUR-ENDPOINT}.cognitiveservices.azure.com/");
202202
AzureKeyCredential credential = new AzureKeyCredential("YOUR-LANGUAGE-RESOURCE-KEY");
203203
QuestionAnsweringClient client = new QuestionAnsweringClient(endpoint, credential);
204204

articles/ai-services/language-service/question-answering/includes/sdk-python.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ You need to update the code below and provide your own values for the following
5252

5353
|Variable name | Value |
5454
|--------------------------|-------------|
55-
| `endpoint` | This value can be found in the **Keys & Endpoint** section when examining your resource from the Azure portal. Alternatively you can find the value in **Language Studio** > **question answering** > **Deploy project** > **Get prediction URL**. An example endpoint is: `https://southcentralus.api.cognitive.microsoft.com/`|
55+
| `endpoint` | This value can be found in the **Keys & Endpoint** section when examining your resource from the Azure portal. Alternatively you can find the value in **Language Studio** > **question answering** > **Deploy project** > **Get prediction URL**. An example endpoint is: `https://southcentralus.cognitiveservices.azure.com/`|
5656
| `credential` | This value can be found in the **Keys & Endpoint** section when examining your resource from the Azure portal. You can use either Key1 or Key2. Always having two valid keys always for secure key rotation with zero downtime. Alternatively you can find the value in **Language Studio** > **question answering** > **Deploy project** > **Get prediction URL**. The key value is part of the sample request.|
5757
| `knowledge_base_project` | The name of your question answering project.|
5858
| `deployment` | There are two possible values: `test`, and `production`. `production` is dependent on you having deployed your project from **Language Studio** > **question answering** > **Deploy project**.|
@@ -64,7 +64,7 @@ You need to update the code below and provide your own values for the following
6464
from azure.core.credentials import AzureKeyCredential
6565
from azure.ai.language.questionanswering import QuestionAnsweringClient
6666

67-
endpoint = "https://{YOUR-ENDPOINT}.api.cognitive.microsoft.com/"
67+
endpoint = "https://{YOUR-ENDPOINT}.cognitiveservices.azure.com/"
6868
credential = AzureKeyCredential("{YOUR-LANGUAGE-RESOURCE-KEY}")
6969
knowledge_base_project = "{YOUR-PROJECT-NAME}"
7070
deployment = "production"
@@ -145,7 +145,7 @@ from azure.core.credentials import AzureKeyCredential
145145
from azure.ai.language.questionanswering import QuestionAnsweringClient
146146
from azure.ai.language.questionanswering import models as qna
147147

148-
endpoint = "https://{YOUR-ENDPOINT}.api.cognitive.microsoft.com/"
148+
endpoint = "https://{YOUR-ENDPOINT}.cognitiveservices.azure.com/"
149149
credential = AzureKeyCredential("YOUR-LANGUAGE-RESOURCE-KEY")
150150

151151
def main():

articles/ai-services/language-service/question-answering/tutorials/multiple-domains.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ You can also create a separate project for each domain and maintain the projects
9595

9696
When the user question is received by the service, you would need to pass on the `projectName` in the REST API endpoint shown to fetch a response from the relevant project. You can locate the URL in the **Deploy project** page under **Get prediction URL**:
9797

98-
`https://southcentralus.api.cognitive.microsoft.com/language/:query-knowledgebases?projectName=Test-Project-English&api-version=2021-10-01&deploymentName=production`
98+
`https://southcentralus.cognitiveservices.azure.com/language/:query-knowledgebases?projectName=Test-Project-English&api-version=2021-10-01&deploymentName=production`
9999

100100
## Create a separate language resource for each domain
101101

0 commit comments

Comments
 (0)