Skip to content
Merged
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## 1.1.0b1 (Unreleased)
Comment thread
mshaban-msft marked this conversation as resolved.
Outdated

### Features Added
* Conversation issue summarization task (Long-running operation)
* Conversation summarization task (Long-running operation)
* Conversation PII extraction task (Long-running operation)

### Breaking Changes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Conversational Language Understanding - aka **CLU** for short - is a cloud-based conversational AI service which provides many language understanding capabilities like:
- Conversation App: It's used in extracting intents and entities in conversations
- Workflow app: Acts like an orchestrator to select the best candidate to analyze conversations to get best response from apps like Qna, Luis, and Conversation App
- Conversational Issue Summarization: Used to summarize conversations in the form of issues, and final resolutions
- Conversational Summarization: Used to summarize conversations in the form of issues, and final resolutions
- Conversational PII: Used to extract and redact personally-identifiable info (PII)

[Source code][conversationallanguage_client_src] | [Package (PyPI)][conversationallanguage_pypi_package] | [API reference documentation][api_reference_documentation] | [Product documentation][conversationallanguage_docs] | [Samples][conversationallanguage_samples]
Expand Down Expand Up @@ -200,7 +200,7 @@ if top_intent_object["targetProjectKind"] == "Luis":

```

### Conversational Issue Summarization
### Conversational Summarization

You can use this sample if you need to summarize a conversation in the form of an issue, and final resolution. For example, a dialog from tech support:

Expand Down Expand Up @@ -267,13 +267,13 @@ with client:
task_result = result["tasks"]["items"][0]
print("... view task status ...")
print("status: {}".format(task_result["status"]))
issue_resolution_result = task_result["results"]
if issue_resolution_result["errors"]:
resolution_result = task_result["results"]
if resolution_result["errors"]:
print("... errors occured ...")
for error in issue_resolution_result["errors"]:
for error in resolution_result["errors"]:
print(error)
else:
conversation_result = issue_resolution_result["conversations"][0]
conversation_result = resolution_result["conversations"][0]
if conversation_result["warnings"]:
print("... view warnings ...")
for warning in conversation_result["warnings"]:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ languages:
products:
- azure
- azure-cognitive-services
- azure-ai-language-understanding
- azure-language-service"
Comment thread
kristapratico marked this conversation as resolved.
Outdated
urlFragment: conversationslanguageunderstanding-samples
---

Expand All @@ -25,7 +25,7 @@ These sample programs show common scenarios for the Conversational Language Unde
| [sample_analyze_orchestration_app_conv_response.py][sample_analyze_orchestration_app_conv_response] and [sample_analyze_orchestration_app_conv_response_async.py][sample_analyze_orchestration_app_conv_response_async]| Analyze user utterance using an orchestration project, which selects the best candidate from one of your different apps to analyze user query (ex: Qna, Conversation, and Luis). In this case, it uses a conversation project. |
| [sample_analyze_orchestration_app_luis_response.py][sample_analyze_orchestration_app_luis_response] and [sample_analyze_orchestration_app_luis_response_async.py][sample_analyze_orchestration_app_luis_response_async]| Analyze user utterance using an orchestration project, which selects the best candidate from one of your different apps to analyze user query (ex: Qna, Conversation, and Luis). In this case, it uses a Luis project. |
| [sample_analyze_orchestration_app_qna_response.py][sample_analyze_orchestration_app_qna_response] and [sample_analyze_orchestration_app_qna_response_async.py][sample_analyze_orchestration_app_qna_response_async]| Analyze user utterance using an orchestration project, which selects the best candidate from one of your different apps to analyze user query (ex: Qna, Conversation, and Luis). In this case, it uses a Qna project. |
| [sample_conv_issue_summarization.py][sample_conv_issue_summarization] and [sample_conv_issue_summarization_async.py][sample_conv_issue_summarization_async]| Summarize conversation in the form of issues and resolutions (ex: tech support conversation) |
| [sample_conv_summarization.py][sample_conv_summarization] and [sample_conv_summarization_async.py][sample_conv_summarization_async]| Summarize conversation in the form of issues and resolutions (ex: tech support conversation) |
| [sample_conv_pii_transcript_input.py][sample_conv_pii_transcript_input] and [sample_conv_pii_transcript_input_async.py][sample_conv_pii_transcript_input_async]| Extract and redact personally-identifiable info from/in conversations |

## Prerequisites
Expand Down Expand Up @@ -79,8 +79,8 @@ what you can do with the Azure Conversational Language Understanding client libr
[sample_analyze_orchestration_app_qna_response]: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/cognitivelanguage/azure-ai-language-conversations/samples/sample_analyze_orchestration_app_qna_response.py
[sample_analyze_orchestration_app_qna_response_async]: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/cognitivelanguage/azure-ai-language-conversations/samples/async/sample_analyze_orchestration_app_qna_response_async.py

[sample_conv_issue_summarization]: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/cognitivelanguage/azure-ai-language-conversations/samples/sample_conv_issue_summarization.py
[sample_conv_issue_summarization_async]: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/cognitivelanguage/azure-ai-language-conversations/samples/async/sample_conv_issue_summarization_async.py
[sample_conv_summarization]: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/cognitivelanguage/azure-ai-language-conversations/samples/sample_conv_summarization.py
[sample_conv_summarization_async]: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/cognitivelanguage/azure-ai-language-conversations/samples/async/sample_conv_summarization_async.py

[sample_conv_pii_transcript_input]: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/cognitivelanguage/azure-ai-language-conversations/samples/sample_conv_pii_transcript_input.py
[sample_conv_pii_transcript_input_async]: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/cognitivelanguage/azure-ai-language-conversations/samples/async/sample_conv_pii_transcript_input_async.py
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
# ------------------------------------

"""
FILE: sample_conv_issue_summarization_async.py
FILE: sample_conv_summarization_async.py

DESCRIPTION:
This sample demonstrates how to analyze a conversation for issue resolution.

For more info about how to setup a CLU conversation project, see the README.

USAGE:
python sample_conv_issue_summarization_async.py
python sample_conv_summarization_async.py

Set the environment variables with your own values before running the sample:
1) AZURE_CONVERSATIONS_ENDPOINT - endpoint for your CLU resource.
Expand All @@ -22,7 +22,7 @@

import asyncio

async def sample_conv_issue_summarization_async():
async def sample_conv_summarization_async():
# [START analyze_conversation_app]
# import libraries
import os
Expand Down Expand Up @@ -86,13 +86,13 @@ async def sample_conv_issue_summarization_async():
task_result = result["tasks"]["items"][0]
print("... view task status ...")
print("status: {}".format(task_result["status"]))
issue_resolution_result = task_result["results"]
if issue_resolution_result["errors"]:
resolution_result = task_result["results"]
if resolution_result["errors"]:
print("... errors occured ...")
for error in issue_resolution_result["errors"]:
for error in resolution_result["errors"]:
print(error)
else:
conversation_result = issue_resolution_result["conversations"][0]
conversation_result = resolution_result["conversations"][0]
if conversation_result["warnings"]:
print("... view warnings ...")
for warning in conversation_result["warnings"]:
Expand All @@ -107,7 +107,7 @@ async def sample_conv_issue_summarization_async():


async def main():
await sample_conv_issue_summarization_async()
await sample_conv_summarization_async()

if __name__ == '__main__':
loop = asyncio.get_event_loop()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,22 @@
# ------------------------------------

"""
FILE: sample_conv_issue_summarization.py
FILE: sample_conv_summarization.py

DESCRIPTION:
This sample demonstrates how to analyze a conversation for issue resolution.

For more info about how to setup a CLU conversation project, see the README.

USAGE:
python sample_conv_issue_summarization.py
python sample_conv_summarization.py

Set the environment variables with your own values before running the sample:
1) AZURE_CONVERSATIONS_ENDPOINT - endpoint for your CLU resource.
2) AZURE_CONVERSATIONS_KEY - API key for your CLU resource.
"""

def sample_conv_issue_summarization():
def sample_conv_summarization():
# [START analyze_conversation_app]
# import libraries
import os
Expand Down Expand Up @@ -84,13 +84,13 @@ def sample_conv_issue_summarization():
task_result = result["tasks"]["items"][0]
print("... view task status ...")
print("status: {}".format(task_result["status"]))
issue_resolution_result = task_result["results"]
if issue_resolution_result["errors"]:
resolution_result = task_result["results"]
if resolution_result["errors"]:
print("... errors occured ...")
for error in issue_resolution_result["errors"]:
for error in resolution_result["errors"]:
print(error)
else:
conversation_result = issue_resolution_result["conversations"][0]
conversation_result = resolution_result["conversations"][0]
if conversation_result["warnings"]:
print("... view warnings ...")
for warning in conversation_result["warnings"]:
Expand All @@ -105,4 +105,4 @@ def sample_conv_issue_summarization():


if __name__ == '__main__':
sample_conv_issue_summarization()
sample_conv_summarization()
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ autorest
### Settings

```yaml
input-file: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/d1716d13b0814a9d0785eda9a74529a315212f53/specification/cognitiveservices/data-plane/Language/preview/2022-05-15-preview/analyzeconversations.json
input-file: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/e7f37e4e43b1d12fd1988fda3ed39624c4b23303/specification/cognitiveservices/data-plane/Language/preview/2022-05-15-preview/analyzeconversations.json
output-folder: ../azure/ai/language/conversations
namespace: azure.ai.language.conversations
package-name: azure-ai-language-conversations
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
from azure.ai.language.conversations.aio import ConversationAnalysisClient


class ConversationalIssueSummarizationAsyncTests(AsyncConversationTest):
class ConversationalSummarizationAsyncTests(AsyncConversationTest):

@GlobalConversationAccountPreparer()
async def test_conversational_issue_summarization(self, endpoint, key):
async def test_conversational_summarization(self, endpoint, key):
Comment thread
mshaban-msft marked this conversation as resolved.
# analyze query
client = ConversationAnalysisClient(endpoint, AzureKeyCredential(key))
async with client:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
)
from azure.ai.language.conversations import ConversationAnalysisClient

class ConversationalIssueSummarizationTests(ConversationTest):
class ConversationalSummarizationTests(ConversationTest):

@GlobalConversationAccountPreparer()
def test_conversational_issue_summarization(self, endpoint, key):
def test_conversational_summarization(self, endpoint, key):
# analyze query
client = ConversationAnalysisClient(endpoint, AzureKeyCredential(key))
with client:
Expand Down