Skip to content

Commit

Permalink
Add May Preview And May GA changes for Analyze ConversationsAurghob/c…
Browse files Browse the repository at this point in the history
…onvmaypreview ga (#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>
  • Loading branch information
3 people committed May 8, 2024
1 parent 0a0fb95 commit 642a48b
Show file tree
Hide file tree
Showing 67 changed files with 14,205 additions and 106 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,7 @@ model SentimentConfidenceScores {
}

/** Enum that defines the length of the output summaries. */
@added(Versions.v2023_11_15_preview)
@added(Versions.v2024_05_01)
union SummaryLengthBucket {
string,

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

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

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
{
"operationId": "AnalyzeConversations",
"title": "SuccessfulAnalyzeConversations",
"parameters": {
"Endpoint": "{Endpoint}",
"Ocp-Apim-Subscription-Key": "{API key}",
"Content-Type": "application/json",
"api-version": "2024-05-01",
"body": {
"kind": "Conversation",
"analysisInput": {
"conversationItem": {
"id": "1",
"participantId": "1",
"text": "play In the air tonight from Phil Collins"
}
},
"parameters": {
"projectName": "{project-name}",
"deploymentName": "{deployment-name}",
"stringIndexType": "TextElement_V8"
}
}
},
"responses": {
"200": {
"headers": {},
"body": {
"kind": "ConversationResult",
"result": {
"query": "play In the air tonight from Phil Collins",
"prediction": {
"topIntent": "PlayMusic",
"projectKind": "Conversation",
"intents": [
{
"category": "PlayMusic",
"confidenceScore": 1
},
{
"category": "SearchCreativeWork",
"confidenceScore": 0
},
{
"category": "AddToPlaylist",
"confidenceScore": 0
}
],
"entities": [
{
"category": "Media.Artist",
"text": "Phil Collins",
"offset": 29,
"length": 12,
"confidenceScore": 1
}
]
}
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
{
"operationId": "AnalyzeConversations",
"title": "SuccessfulAnalyzeConversationsArbitration",
"parameters": {
"Endpoint": "{Endpoint}",
"Ocp-Apim-Subscription-Key": "{API key}",
"Content-Type": "application/json",
"api-version": "2024-05-01",
"body": {
"kind": "Conversation",
"analysisInput": {
"conversationItem": {
"participantId": "1",
"id": "1",
"modality": "text",
"language": "en-GB",
"text": "How do I integrate QnA Maker and LUIS?"
}
},
"parameters": {
"projectName": "{project-name}",
"deploymentName": "{deployment-name}",
"verbose": true,
"isLoggingEnabled": false,
"stringIndexType": "TextElement_V8"
}
}
},
"responses": {
"200": {
"headers": {},
"body": {
"kind": "ConversationResult",
"result": {
"query": "trains from London",
"prediction": {
"topIntent": "Rail",
"projectKind": "Orchestration",
"intents": {
"Rail": {
"confidenceScore": 1,
"targetProjectKind": "Conversation",
"result": {
"query": "trains from London",
"prediction": {
"topIntent": "Timetable",
"projectKind": "Conversation",
"intents": [
{
"category": "Timetable",
"confidenceScore": 0.99968535
},
{
"category": "Locomotive",
"confidenceScore": 0.000314623
}
],
"entities": []
}
}
},
"Tree": {
"confidenceScore": 0.2641529,
"targetProjectKind": "QuestionAnswering"
},
"None": {
"confidenceScore": 0,
"targetProjectKind": "NonLinked"
}
}
}
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
{
"operationId": "AnalyzeConversations",
"title": "SuccessfulAnalyzeConversationsArbitrationDirectTarget",
"parameters": {
"Endpoint": "{Endpoint}",
"Ocp-Apim-Subscription-Key": "{API key}",
"Content-Type": "application/json",
"api-version": "2024-05-01",
"body": {
"kind": "Conversation",
"analysisInput": {
"conversationItem": {
"text": "Ports and connectors",
"participantId": "1",
"id": "1"
}
},
"parameters": {
"projectName": "prj1",
"deploymentName": "dep1",
"directTarget": "qnaProject",
"targetProjectParameters": {
"qnaProject": {
"targetProjectKind": "QuestionAnswering",
"callingOptions": {
"context": {
"previousUserQuery": "Meet Surface Pro 4",
"previousQnaId": 4
},
"top": 1,
"question": "App Service overview"
}
}
}
}
}
},
"responses": {
"200": {
"headers": {},
"body": {
"kind": "ConversationResult",
"result": {
"query": "Ports and connectors",
"prediction": {
"projectKind": "Orchestration",
"topIntent": "qnaTargetApp",
"intents": {
"qnaTargetApp": {
"targetProjectKind": "QuestionAnswering",
"confidenceScore": 1,
"result": {
"answers": [
{
"questions": [
"App Service overview"
],
"answer": "The compute resources you use are determined by the *App Service plan* that you run your apps on.",
"confidenceScore": 0.7384000000000001,
"id": 1,
"source": "https://docs.microsoft.com/en-us/azure/app-service/overview",
"metadata": {},
"dialog": {
"isContextOnly": false,
"prompts": []
}
}
]
}
}
}
}
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"operationId": "AnalyzeConversationsCancelJob",
"title": "SuccessfulAnalyzeConversationsJobsCancelRequest",
"parameters": {
"Ocp-Apim-Subscription-Key": "{API key}",
"api-version": "2024-05-01",
"Endpoint": "{Endpoint}",
"jobId": "c0f2a446-05d9-48fc-ba8f-3ef4af8d0b18"
},
"responses": {
"202": {
"headers": {
"Operation-Location": "{Endpoint}/language/analyze-conversations/jobs/{jobId}?api-version=2024-05-01"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
{
"operationId": "AnalyzeConversationsSubmitJob",
"title": "SuccessfulConversationPIIExclusionSubmit",
"parameters": {
"Ocp-Apim-Subscription-Key": "{API key}",
"api-version": "2024-05-01",
"Endpoint": "{Endpoint}",
"jobId": "{Job ID}",
"body": {
"displayName": "Redacting PII data from transcribed audio",
"analysisInput": {
"conversations": [
{
"id": "1",
"language": "en",
"modality": "transcript",
"domain": "generic",
"conversationItems": [
{
"participantId": "1",
"id": "1",
"text": "Good morning John Doe.",
"itn": "good morning john doe",
"maskedItn": "good morning john doe",
"lexical": "good morning john doe",
"wordLevelTimings": [
{
"word": "good",
"offset": 390000,
"duration": 2700000
},
{
"word": "morning",
"offset": 4500000,
"duration": 920000
},
{
"word": "john",
"offset": 590000,
"duration": 2700000
},
{
"word": "doe",
"offset": 6300000,
"duration": 920000
}
]
}
]
}
]
},
"tasks": [
{
"taskName": "Conversation PII",
"kind": "ConversationalPIITask",
"parameters": {
"modelVersion": "latest",
"excludePiiCategories": [
"Person"
],
"redactionSource": "lexical",
"redactAudioTiming": true
}
}
]
}
},
"responses": {
"202": {
"headers": {
"Operation-Location": "{Endpoint}/language/analyze-conversation/jobs/{jobId}?api-version=2024-05-01"
}
}
}
}

0 comments on commit 642a48b

Please sign in to comment.