Skip to content

Commit 3f2a011

Browse files
authored
[cognitivelanguage] add live pipeline (Azure#20986)
1 parent 848cc57 commit 3f2a011

File tree

3 files changed

+14
-33
lines changed

3 files changed

+14
-33
lines changed

sdk/cognitivelanguage/azure-ai-language-questionanswering/samples/sample_chat.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ def sample_chit_chat():
5151
deployment_name="test"
5252
)
5353
best_candidate = [a for a in output.answers if a.confidence_score > 0.9][0]
54-
print("Q: {}".format(first_question.question))
55-
print("A: {}".format(best_candidate.answer))
54+
print(u"Q: {}".format(first_question.question))
55+
print(u"A: {}".format(best_candidate.answer))
5656

5757
followup_question = qna.QueryKnowledgeBaseOptions(
5858
question="How long it takes to charge Surface?",
@@ -75,8 +75,8 @@ def sample_chit_chat():
7575
project_name=knowledge_base_project,
7676
deployment_name="test"
7777
)
78-
print("Q: {}".format(followup_question.question))
79-
print("A: {}".format(output.answers[0].answer))
78+
print(u"Q: {}".format(followup_question.question))
79+
print(u"A: {}".format(output.answers[0].answer))
8080

8181
# [END chit_chat]
8282

sdk/cognitivelanguage/azure-ai-language-questionanswering/samples/sample_query_text.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ def sample_query_text():
5050
output = client.query_text(input)
5151

5252
best_answer = [a for a in output.answers if a.confidence_score > 0.9][0]
53-
print("Q: {}".format(input.question))
54-
print("A: {}".format(best_answer.answer))
53+
print(u"Q: {}".format(input.question))
54+
print(u"A: {}".format(best_answer.answer))
5555

5656
# [END query_text]
5757

sdk/cognitivelanguage/tests.yml

Lines changed: 8 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,24 @@
1-
trigger:
2-
branches:
3-
include:
4-
- master
5-
- main
6-
- hotfix/*
7-
- release/*
8-
- restapi*
9-
paths:
10-
include:
11-
- sdk/cognitivelanguage/
12-
- scripts/
13-
14-
pr:
15-
branches:
16-
include:
17-
- master
18-
- main
19-
- feature/*
20-
- hotfix/*
21-
- release/*
22-
- restapi*
23-
paths:
24-
include:
25-
- sdk/cognitivelanguage/
1+
trigger: none
262

273
stages:
284
- template: ../../eng/pipelines/templates/stages/archetype-sdk-tests.yml
295
parameters:
306
AllocateResourceGroup: false
7+
BuildTargetingString: azure*
318
ServiceDirectory: cognitivelanguage
329
MatrixReplace:
3310
- TestSamples=.*/true
3411
EnvVars:
3512
AZURE_QUESTIONANSWERING_KEY: $(qna-key)
3613
AZURE_QUESTIONANSWERING_PROJECT: 190a9e13-8ede-4e4b-a8fd-c4d7f2aeab6c
3714
AZURE_QUESTIONANSWERING_ENDPOINT: $(qna-uri)
15+
AZURE_CONVERSATIONS_ENDPOINT: $(conversations-endpoint)
16+
AZURE_CONVERSATIONS_KEY: $(conversations-key)
17+
AZURE_CONVERSATIONS_PROJECT: $(conversations-project)
18+
AZURE_CONVERSATIONS_WORKFLOW_PROJECT: $(conversations-workflow-project)
3819
AZURE_CLIENT_ID: $(aad-azure-sdk-test-client-id)
3920
AZURE_CLIENT_SECRET: $(aad-azure-sdk-test-client-secret)
4021
AZURE_SUBSCRIPTION_ID: $(azure-subscription-id)
4122
AZURE_TENANT_ID: $(aad-azure-sdk-test-tenant-id)
42-
TEST_MODE: 'RunLiveNoRecord' # use when allowing preparers to create the rgs for you
43-
AZURE_TEST_RUN_LIVE: 'true' # use when utilizing the New-TestResources Script
23+
TEST_MODE: "RunLiveNoRecord" # use when allowing preparers to create the rgs for you
24+
AZURE_TEST_RUN_LIVE: "true" # use when utilizing the New-TestResources Script

0 commit comments

Comments
 (0)