Skip to content

Commit 642a48b

Browse files
aurghobAurgho Bhattacharjeenithya4
authored
Add May Preview And May GA changes for Analyze ConversationsAurghob/convmaypreview ga (Azure#28841)
* Add examples and api version for May GA and Preview * Add Aspect related tsp changes * Some API version corrections * Remove Custom Conv Summarization examples from May GA examples * minor api adjustments for other custom conv summarization attributes * Add an example and specifications for entity tags (#1) * compile fixes * Add examples * Examples changes * Changes to remove older preview API version in Analyze conversations * Fix compile error and add compiled swagger json * Fix some avocado and prettier check issues * Fix some more lintdiff and avocado errors * Correct Readme * Fix typespec validation * Address minor documenatation comment --------- Co-authored-by: Aurgho Bhattacharjee <aurghob@microsoft.com> Co-authored-by: nithya4 <13850604+nithya4@users.noreply.github.com>
1 parent 0a0fb95 commit 642a48b

File tree

67 files changed

+14205
-106
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+14205
-106
lines changed

specification/cognitiveservices/Language.Conversations/common.tsp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -543,7 +543,7 @@ model SentimentConfidenceScores {
543543
}
544544

545545
/** Enum that defines the length of the output summaries. */
546-
@added(Versions.v2023_11_15_preview)
546+
@added(Versions.v2024_05_01)
547547
union SummaryLengthBucket {
548548
string,
549549

@@ -567,7 +567,7 @@ model AbstractiveSummarizationTaskParametersBase {
567567
stringIndexType?: StringIndexType = StringIndexType.TextElements_v8;
568568

569569
/** (NOTE: Recommended to use summaryLength over sentenceCount) Controls the approximate length of the output summaries. */
570-
@added(Versions.v2023_11_15_preview)
570+
@added(Versions.v2024_05_01)
571571
summaryLength?: SummaryLengthBucket;
572572
}
573573

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
{
2+
"operationId": "AnalyzeConversations",
3+
"title": "SuccessfulAnalyzeConversations",
4+
"parameters": {
5+
"Endpoint": "{Endpoint}",
6+
"Ocp-Apim-Subscription-Key": "{API key}",
7+
"Content-Type": "application/json",
8+
"api-version": "2024-05-01",
9+
"body": {
10+
"kind": "Conversation",
11+
"analysisInput": {
12+
"conversationItem": {
13+
"id": "1",
14+
"participantId": "1",
15+
"text": "play In the air tonight from Phil Collins"
16+
}
17+
},
18+
"parameters": {
19+
"projectName": "{project-name}",
20+
"deploymentName": "{deployment-name}",
21+
"stringIndexType": "TextElement_V8"
22+
}
23+
}
24+
},
25+
"responses": {
26+
"200": {
27+
"headers": {},
28+
"body": {
29+
"kind": "ConversationResult",
30+
"result": {
31+
"query": "play In the air tonight from Phil Collins",
32+
"prediction": {
33+
"topIntent": "PlayMusic",
34+
"projectKind": "Conversation",
35+
"intents": [
36+
{
37+
"category": "PlayMusic",
38+
"confidenceScore": 1
39+
},
40+
{
41+
"category": "SearchCreativeWork",
42+
"confidenceScore": 0
43+
},
44+
{
45+
"category": "AddToPlaylist",
46+
"confidenceScore": 0
47+
}
48+
],
49+
"entities": [
50+
{
51+
"category": "Media.Artist",
52+
"text": "Phil Collins",
53+
"offset": 29,
54+
"length": 12,
55+
"confidenceScore": 1
56+
}
57+
]
58+
}
59+
}
60+
}
61+
}
62+
}
63+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
{
2+
"operationId": "AnalyzeConversations",
3+
"title": "SuccessfulAnalyzeConversationsArbitration",
4+
"parameters": {
5+
"Endpoint": "{Endpoint}",
6+
"Ocp-Apim-Subscription-Key": "{API key}",
7+
"Content-Type": "application/json",
8+
"api-version": "2024-05-01",
9+
"body": {
10+
"kind": "Conversation",
11+
"analysisInput": {
12+
"conversationItem": {
13+
"participantId": "1",
14+
"id": "1",
15+
"modality": "text",
16+
"language": "en-GB",
17+
"text": "How do I integrate QnA Maker and LUIS?"
18+
}
19+
},
20+
"parameters": {
21+
"projectName": "{project-name}",
22+
"deploymentName": "{deployment-name}",
23+
"verbose": true,
24+
"isLoggingEnabled": false,
25+
"stringIndexType": "TextElement_V8"
26+
}
27+
}
28+
},
29+
"responses": {
30+
"200": {
31+
"headers": {},
32+
"body": {
33+
"kind": "ConversationResult",
34+
"result": {
35+
"query": "trains from London",
36+
"prediction": {
37+
"topIntent": "Rail",
38+
"projectKind": "Orchestration",
39+
"intents": {
40+
"Rail": {
41+
"confidenceScore": 1,
42+
"targetProjectKind": "Conversation",
43+
"result": {
44+
"query": "trains from London",
45+
"prediction": {
46+
"topIntent": "Timetable",
47+
"projectKind": "Conversation",
48+
"intents": [
49+
{
50+
"category": "Timetable",
51+
"confidenceScore": 0.99968535
52+
},
53+
{
54+
"category": "Locomotive",
55+
"confidenceScore": 0.000314623
56+
}
57+
],
58+
"entities": []
59+
}
60+
}
61+
},
62+
"Tree": {
63+
"confidenceScore": 0.2641529,
64+
"targetProjectKind": "QuestionAnswering"
65+
},
66+
"None": {
67+
"confidenceScore": 0,
68+
"targetProjectKind": "NonLinked"
69+
}
70+
}
71+
}
72+
}
73+
}
74+
}
75+
}
76+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
{
2+
"operationId": "AnalyzeConversations",
3+
"title": "SuccessfulAnalyzeConversationsArbitrationDirectTarget",
4+
"parameters": {
5+
"Endpoint": "{Endpoint}",
6+
"Ocp-Apim-Subscription-Key": "{API key}",
7+
"Content-Type": "application/json",
8+
"api-version": "2024-05-01",
9+
"body": {
10+
"kind": "Conversation",
11+
"analysisInput": {
12+
"conversationItem": {
13+
"text": "Ports and connectors",
14+
"participantId": "1",
15+
"id": "1"
16+
}
17+
},
18+
"parameters": {
19+
"projectName": "prj1",
20+
"deploymentName": "dep1",
21+
"directTarget": "qnaProject",
22+
"targetProjectParameters": {
23+
"qnaProject": {
24+
"targetProjectKind": "QuestionAnswering",
25+
"callingOptions": {
26+
"context": {
27+
"previousUserQuery": "Meet Surface Pro 4",
28+
"previousQnaId": 4
29+
},
30+
"top": 1,
31+
"question": "App Service overview"
32+
}
33+
}
34+
}
35+
}
36+
}
37+
},
38+
"responses": {
39+
"200": {
40+
"headers": {},
41+
"body": {
42+
"kind": "ConversationResult",
43+
"result": {
44+
"query": "Ports and connectors",
45+
"prediction": {
46+
"projectKind": "Orchestration",
47+
"topIntent": "qnaTargetApp",
48+
"intents": {
49+
"qnaTargetApp": {
50+
"targetProjectKind": "QuestionAnswering",
51+
"confidenceScore": 1,
52+
"result": {
53+
"answers": [
54+
{
55+
"questions": [
56+
"App Service overview"
57+
],
58+
"answer": "The compute resources you use are determined by the *App Service plan* that you run your apps on.",
59+
"confidenceScore": 0.7384000000000001,
60+
"id": 1,
61+
"source": "https://docs.microsoft.com/en-us/azure/app-service/overview",
62+
"metadata": {},
63+
"dialog": {
64+
"isContextOnly": false,
65+
"prompts": []
66+
}
67+
}
68+
]
69+
}
70+
}
71+
}
72+
}
73+
}
74+
}
75+
}
76+
}
77+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"operationId": "AnalyzeConversationsCancelJob",
3+
"title": "SuccessfulAnalyzeConversationsJobsCancelRequest",
4+
"parameters": {
5+
"Ocp-Apim-Subscription-Key": "{API key}",
6+
"api-version": "2024-05-01",
7+
"Endpoint": "{Endpoint}",
8+
"jobId": "c0f2a446-05d9-48fc-ba8f-3ef4af8d0b18"
9+
},
10+
"responses": {
11+
"202": {
12+
"headers": {
13+
"Operation-Location": "{Endpoint}/language/analyze-conversations/jobs/{jobId}?api-version=2024-05-01"
14+
}
15+
}
16+
}
17+
}
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
{
2+
"operationId": "AnalyzeConversationsSubmitJob",
3+
"title": "SuccessfulConversationPIIExclusionSubmit",
4+
"parameters": {
5+
"Ocp-Apim-Subscription-Key": "{API key}",
6+
"api-version": "2024-05-01",
7+
"Endpoint": "{Endpoint}",
8+
"jobId": "{Job ID}",
9+
"body": {
10+
"displayName": "Redacting PII data from transcribed audio",
11+
"analysisInput": {
12+
"conversations": [
13+
{
14+
"id": "1",
15+
"language": "en",
16+
"modality": "transcript",
17+
"domain": "generic",
18+
"conversationItems": [
19+
{
20+
"participantId": "1",
21+
"id": "1",
22+
"text": "Good morning John Doe.",
23+
"itn": "good morning john doe",
24+
"maskedItn": "good morning john doe",
25+
"lexical": "good morning john doe",
26+
"wordLevelTimings": [
27+
{
28+
"word": "good",
29+
"offset": 390000,
30+
"duration": 2700000
31+
},
32+
{
33+
"word": "morning",
34+
"offset": 4500000,
35+
"duration": 920000
36+
},
37+
{
38+
"word": "john",
39+
"offset": 590000,
40+
"duration": 2700000
41+
},
42+
{
43+
"word": "doe",
44+
"offset": 6300000,
45+
"duration": 920000
46+
}
47+
]
48+
}
49+
]
50+
}
51+
]
52+
},
53+
"tasks": [
54+
{
55+
"taskName": "Conversation PII",
56+
"kind": "ConversationalPIITask",
57+
"parameters": {
58+
"modelVersion": "latest",
59+
"excludePiiCategories": [
60+
"Person"
61+
],
62+
"redactionSource": "lexical",
63+
"redactAudioTiming": true
64+
}
65+
}
66+
]
67+
}
68+
},
69+
"responses": {
70+
"202": {
71+
"headers": {
72+
"Operation-Location": "{Endpoint}/language/analyze-conversation/jobs/{jobId}?api-version=2024-05-01"
73+
}
74+
}
75+
}
76+
}

0 commit comments

Comments
 (0)