Skip to content

Commit c54c3d9

Browse files
amber-Chen-86azure-sdkmccoyp
authored
Conv runtime python sdk 20250515preview (#42271)
* Configurations: 'specification/cognitiveservices/Language.Conversations/tspconfig.yaml', API Version: 2025-05-15-preview, SDK Release Type: beta, and CommitSHA: '681db46dd0a9bf82b91c91687f2bb600278a8c5c' in SpecRepo: 'https://github.com/Azure/azure-rest-api-specs' * added test for conversation prediciton * modify all the clientname to be same as csharp * removed aiconversation and reuse textConversation * change version to `1.2.0b1` * update the version to '2.0.0b1' * update the clientname * modify clientname for canceljob and submitjob * updated operation clientnames * added analyze_conversations function to retrieve the result object * added overload and documents for analyze_conversations * change name of analyze_conversations to begin_analyze_conversation_job * make get_job_status private * make the original begin_analyze_conversation_job private * renamed to ConversationalAILanguageUnderstandingActionContent * updated Tasks.items to "taskResults" clientName * updated clientName to NonLinkedTargetIntentResult * modify test for summarization * added custom begin_analyze_conversation_job to aio client * add sync custom AnalyzeConversationLROPoller, and add a summarization test for it. * added customed async AnalyzeConversationAsyncLROPoller, and modify begin_analyze_conversation_job accordingly * add test for async conversation summarization * removed Luis related types * modify return type from AnalyzeConversationLROPoller to AnalyzeConversationLROPoller[ItemPaged[ConversationActions]] * modify aio return type from AnalyzeConversationAsyncLROPoller to AnalyzeConversationAsyncLROPoller[AsyncItemPaged[ConversationActions]] and adjust tests * add test for conversation prediction * add tests for prediction sync and async * move the custom poller to the top namespace and modify the tests * modified test prefix from authoring to conversations * add tests for orchestration prediction * added tests for prediction with options * added tests for prediction with language * added tests for conversation pii * correct the test names * added tests for pii with character mask policy. add await client.close() to all async tests * added tests for pii with entity mask policy * add tests for pii with no mask policy * added tests for multi-turn prediction * updated assets.json * removed generated tests and generated samples * updated change log * fixed typo in change log * delete authoring samples * added __all__: List[str] = [] to patch.py * added samples for orchestration_prediction * added samples for conversation_summarization * modify samples for orchestration_prediction * added samples for conversation_prediction * added samples for conversation_prediction_with_options * added samples for conversation_prediction_with_language * removed old samples * added samples for conversation_pii * add samples for conversation_pii_with_no_mask_policy * added tests for conversation_pii_with_entity_mask_policy * added samples for conversation_pii_with_character_mask_policy * added samples for conversation_multi_turn_prediction * add suppress on test and sample * updated the fake endpoint * updated tag in assets.json * fix check spelling * add Generic[PollingReturnType_co] to custom poller * fix pylint * # pylint:disable * updated general readme * add apiview to client init * updated general readme * updated the samples readme * remove luis from readme * add next steps and resume the code sample * fix indentication * rename ConversationActionContent * fixed pylint * updated all the async samples * updated sync samples * remove all unnecessary isinstance * modify record_state_for_details to private * updated to qa is not None and qa.answers is not None in samples * added # pylint:disable=protected-access * udpated the date on change log * removed empty changelog entries * Update sdk/cognitivelanguage/azure-ai-language-conversations/CHANGELOG.md Co-authored-by: McCoy Patiño <[email protected]> * Update sdk/cognitivelanguage/azure-ai-language-conversations/README.md Co-authored-by: McCoy Patiño <[email protected]> * replace PowerShellPreparer with EnvironmentVariableLoader --------- Co-authored-by: azure-sdk <[email protected]> Co-authored-by: McCoy Patiño <[email protected]>
1 parent e388455 commit c54c3d9

File tree

124 files changed

+14879
-19179
lines changed

Some content is hidden

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

124 files changed

+14879
-19179
lines changed

.vscode/cspell.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -818,7 +818,7 @@
818818
},
819819
{
820820
"filename": "sdk/cognitivelanguage/azure-ai-language-conversations/**",
821-
"words": [ "conv", "summ" ],
821+
"words": [ "conv", "summ", "Enviar", "presentación", "CLU's"],
822822
"caseSensitive": false
823823
},
824824
{

sdk/cognitivelanguage/azure-ai-language-conversations/CHANGELOG.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,20 @@
11
# Release History
22

3-
## 1.1.1 (Unreleased)
3+
## 2.0.0b1 (2025-08-22)
44

55
### Features Added
6+
- Added support for service version 2024-05-01, 2024-11-01, 2024-11-15-preview,2025-05-15-preview.
67

7-
### Breaking Changes
8+
- Added custom poller AnalyzeConversationLROPoller and AnalyzeConversationAsyncLROPoller, and make begin_analyze_conversation_job return AnalyzeConversationLROPoller[ItemPaged[ConversationActions]] or AnalyzeConversationAsyncLROPoller[ItemPaged[ConversationActions]].
89

9-
### Bugs Fixed
10+
- Added three different type of Redaction Policy `CharacterMaskPolicyType`, `EntityMaskTypePolicyType` and `NoMaskPolicyType`.
1011

11-
### Other Changes
12+
- Added AI Conversation Analyze (Multi-turn conversation prediction) feature.
13+
14+
- Added tests and samples for new features.
15+
16+
### Breaking Changes
17+
- Removed support for Conversations Authoring.
1218

1319
## 1.1.0 (2023-06-13)
1420

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
include *.md
22
include LICENSE
3+
include azure/ai/language/conversations/py.typed
4+
recursive-include tests *.py
5+
recursive-include samples *.py *.md
36
include azure/__init__.py
47
include azure/ai/__init__.py
58
include azure/ai/language/__init__.py
6-
recursive-include tests *.py
7-
recursive-include samples *.py *.md
8-
recursive-include doc *.rst
9-
include azure/ai/language/conversations/py.typed
10-
include azure/ai/language/conversations/authoring/py.typed

sdk/cognitivelanguage/azure-ai-language-conversations/README.md

Lines changed: 3 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# Azure Conversational Language Understanding client library for Python
44
Conversational Language Understanding - aka **CLU** for short - is a cloud-based conversational AI service which provides many language understanding capabilities like:
55
- Conversation App: It's used in extracting intents and entities in conversations
6-
- 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
6+
- Workflow app: Acts like an orchestrator to select the best candidate to analyze conversations to get best response from apps like Qna and Conversation App
77
- Conversational Summarization: Used to analyze conversations in the form of issues/resolution, chapter title, and narrative summarizations
88

99
[Source code][conversationallanguage_client_src]
@@ -31,10 +31,10 @@ Install the Azure Conversations client library for Python with [pip][pip_link]:
3131
pip install azure-ai-language-conversations
3232
```
3333

34-
> Note: This version of the client library defaults to the 2023-04-01 version of the service
34+
> Note: This version of the client library defaults to the 2025-05-15-preview version of the service
3535
3636
### Authenticate the client
37-
In order to interact with the CLU service, you'll need to create an instance of the [ConversationAnalysisClient][conversationanalysisclient_class] class, or [ConversationAuthoringClient][conversationauthoringclient_class] class. You will need an **endpoint**, and an **API key** to instantiate a client object. For more information regarding authenticating with Cognitive Services, see [Authenticate requests to Azure Cognitive Services][cognitive_auth].
37+
In order to interact with the CLU service, you'll need to create an instance of the [ConversationAnalysisClient][conversationanalysisclient_class] class. You will need an **endpoint**, and an **API key** to instantiate a client object. For more information regarding authenticating with Cognitive Services, see [Authenticate requests to Azure Cognitive Services][cognitive_auth].
3838

3939
#### Get an API key
4040
You can get the **endpoint** and an **API key** from the Cognitive Services resource in the [Azure Portal][azure_portal].
@@ -58,18 +58,6 @@ credential = AzureKeyCredential("<api-key>")
5858
client = ConversationAnalysisClient(endpoint, credential)
5959
```
6060

61-
#### Create ConversationAuthoringClient
62-
Once you've determined your **endpoint** and **API key** you can instantiate a `ConversationAuthoringClient`:
63-
64-
```python
65-
from azure.core.credentials import AzureKeyCredential
66-
from azure.ai.language.conversations.authoring import ConversationAuthoringClient
67-
68-
endpoint = "https://<my-custom-subdomain>.cognitiveservices.azure.com/"
69-
credential = AzureKeyCredential("<api-key>")
70-
client = ConversationAuthoringClient(endpoint, credential)
71-
```
72-
7361
#### Create a client with an Azure Active Directory Credential
7462

7563
To use an [Azure Active Directory (AAD) token credential][cognitive_authentication_aad],
@@ -106,9 +94,6 @@ client = ConversationAnalysisClient(endpoint="https://<my-custom-subdomain>.cogn
10694
### ConversationAnalysisClient
10795
The [ConversationAnalysisClient][conversationanalysisclient_class] is the primary interface for making predictions using your deployed Conversations models. For asynchronous operations, an async `ConversationAnalysisClient` is in the `azure.ai.language.conversation.aio` namespace.
10896

109-
### ConversationAuthoringClient
110-
You can use the [ConversationAuthoringClient][conversationauthoringclient_class] to interface with the [Azure Language Portal][azure_language_portal] to carry out authoring operations on your language resource/project. For example, you can use it to create a project, populate with training data, train, test, and deploy. For asynchronous operations, an async `ConversationAuthoringClient` is in the `azure.ai.language.conversation.authoring.aio` namespace.
111-
11297
## Examples
11398
The `azure-ai-language-conversation` client library provides both synchronous and asynchronous APIs.
11499

@@ -395,7 +380,6 @@ print(response)
395380

396381
```
397382

398-
399383
## Optional Configuration
400384

401385
Optional keyword arguments can be passed in at the client and per-operation level. The azure-core [reference documentation][azure_core_ref_docs] describes available configurations for retries, logging, transport protocols, and more.
@@ -486,7 +470,6 @@ This project has adopted the [Microsoft Open Source Code of Conduct][code_of_con
486470
[conversationallanguage_samples]: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/cognitivelanguage/azure-ai-language-conversations/samples/README.md
487471
[conversationallanguage_restdocs]: https://learn.microsoft.com/rest/api/language/
488472
[conversationanalysisclient_class]: https://azuresdkdocs.z19.web.core.windows.net/python/azure-ai-language-conversations/latest/azure.ai.language.conversations.html#azure.ai.language.conversations.ConversationAnalysisClient
489-
[conversationauthoringclient_class]: https://azuresdkdocs.z19.web.core.windows.net/python/azure-ai-language-conversations/latest/azure.ai.language.conversations.html#azure.ai.language.conversations.ConversationAuthoringClient
490473
[azure_core_exceptions]: https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/core/azure-core/README.md
491474
[azure_language_portal]: https://language.cognitive.azure.com/home
492475
[cognitive_authentication_aad]: https://learn.microsoft.com/azure/cognitive-services/authentication#authenticate-with-azure-active-directory
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"apiVersion": "2025-05-15-preview"
3+
}

0 commit comments

Comments
 (0)