Skip to content

Commit 4b1b18e

Browse files
authored
Update sdk-python.md
Change the endpoint URL to the new format as reflected in the Language Studio.
1 parent 0fdb6d4 commit 4b1b18e

File tree

1 file changed

+3
-3
lines changed
  • articles/ai-services/language-service/question-answering/includes

1 file changed

+3
-3
lines changed

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():

0 commit comments

Comments
 (0)