Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Release History

## 1.0.0b3 (2025-12-09)

### Features Added
- Added support for service version 2025-11-01.

### Other Changes
- Updated deployment samples (sync and async) to demonstrate usage with both 2025-11-01 (GA) and 2025-11-15-preview service versions.

## 1.0.0b2 (2025-11-14)

### Features Added
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,14 @@ pip install azure-ai-language-conversations-authoring

> Note: This version of the client library defaults to the 2025-11-15-preview version of the service

This table shows the relationship between SDK versions and supported API versions of the service

| SDK version | Supported API version of service |
| ------------ | --------------------------------- |
| 1.0.0b3 - Latest preview release | 2023-04-01, 2025-11-01, 2025-05-15-preview, 2025-11-15-preview (default) |
| 1.0.0b2 | 2023-04-01, 2025-05-15-preview, 2025-11-15-preview (default) |
| 1.0.0b1 | 2023-04-01, 2024-11-15-preview, 2025-05-15-preview (default) |

### Authenticate the client

To interact with the Conversation Authoring service, you'll need to create an instance of the `ConversationAuthoringClient`. 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].
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
"azure.ai.language.conversations.authoring.models.DataGenerationConnectionInfo": "Language.Conversations.Authoring.AnalyzeConversationAuthoringDataGenerationConnectionInfo",
"azure.ai.language.conversations.authoring.models.DataGenerationSettings": "Language.Conversations.Authoring.AnalyzeConversationAuthoringDataGenerationSettings",
"azure.ai.language.conversations.authoring.models.DeploymentDeleteFromResourcesState": "Language.Conversations.Authoring.AnalyzeConversationAuthoringDeploymentDeleteFromResourcesJobState",
"azure.ai.language.conversations.authoring.models.DeploymentResource": "Language.Conversations.Authoring.AnalyzeConversationAuthoringDeploymentResource",
"azure.ai.language.conversations.authoring.models.DeploymentState": "Language.Conversations.Authoring.AnalyzeConversationAuthoringDeploymentJobState",
"azure.ai.language.conversations.authoring.models.EntitiesEvaluationSummary": "Language.Conversations.Authoring.AnalyzeConversationAuthoringEntitiesEvaluationSummary",
"azure.ai.language.conversations.authoring.models.EntityEvaluationSummary": "Language.Conversations.Authoring.AnalyzeConversationAuthoringEntityEvaluationSummary",
Expand Down Expand Up @@ -99,12 +98,6 @@
"azure.ai.language.conversations.authoring.aio.ConversationAuthoringClient.create_project": "Language.ConversationsAuthoringClientCustomizations.ConversationAuthoringClient.createProject",
"azure.ai.language.conversations.authoring.ConversationAuthoringClient.get_project": "Language.ConversationsAuthoringClientCustomizations.ConversationAuthoringClient.getProject",
"azure.ai.language.conversations.authoring.aio.ConversationAuthoringClient.get_project": "Language.ConversationsAuthoringClientCustomizations.ConversationAuthoringClient.getProject",
"azure.ai.language.conversations.authoring.ConversationAuthoringClient.begin_delete_project": "Language.ConversationsAuthoringClientCustomizations.ConversationAuthoringClient.deleteProject",
"azure.ai.language.conversations.authoring.aio.ConversationAuthoringClient.begin_delete_project": "Language.ConversationsAuthoringClientCustomizations.ConversationAuthoringClient.deleteProject",
"azure.ai.language.conversations.authoring.ConversationAuthoringClient.get_export_status": "Language.ConversationsAuthoringClientCustomizations.ConversationAuthoringClient.getExportStatus",
"azure.ai.language.conversations.authoring.aio.ConversationAuthoringClient.get_export_status": "Language.ConversationsAuthoringClientCustomizations.ConversationAuthoringClient.getExportStatus",
"azure.ai.language.conversations.authoring.ConversationAuthoringClient.get_import_status": "Language.ConversationsAuthoringClientCustomizations.ConversationAuthoringClient.getImportStatus",
"azure.ai.language.conversations.authoring.aio.ConversationAuthoringClient.get_import_status": "Language.ConversationsAuthoringClientCustomizations.ConversationAuthoringClient.getImportStatus",
"azure.ai.language.conversations.authoring.operations.DeploymentOperations.get_deployment": "Language.ConversationsAuthoringClientCustomizations.ConversationAuthoringProjectClient.DeploymentOperations.getDeployment",
"azure.ai.language.conversations.authoring.aio.operations.DeploymentOperations.get_deployment": "Language.ConversationsAuthoringClientCustomizations.ConversationAuthoringProjectClient.DeploymentOperations.getDeployment",
"azure.ai.language.conversations.authoring.operations.DeploymentOperations.begin_deploy_project": "Language.ConversationsAuthoringClientCustomizations.ConversationAuthoringProjectClient.DeploymentOperations.deployProject",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
"AssetsRepo": "Azure/azure-sdk-assets",
"AssetsRepoPrefixPath": "python",
"TagPrefix": "python/cognitivelanguage/azure-ai-language-conversations-authoring",
"Tag": "python/cognitivelanguage/azure-ai-language-conversations-authoring_20102747af"
"Tag": "python/cognitivelanguage/azure-ai-language-conversations-authoring_94c35e32fe"
}
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@ class ConversationAuthoringClient(_ConversationAuthoringClientOperationsMixin):
"2025-11-15-preview". Note that overriding this default value may result in unsupported
behavior.
:paramtype api_version: str
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
Retry-After header is present.
"""

def __init__(self, endpoint: str, credential: Union[AzureKeyCredential, "TokenCredential"], **kwargs: Any) -> None:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ def get_project_client(self, project_name: str) -> ConversationAuthoringProjectC
endpoint=self._config.endpoint,
credential=self._config.credential,
project_name=project_name,
api_version=self._config.api_version,
)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

VERSION = "1.0.0b2"
VERSION = "1.0.0b3"
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@ class ConversationAuthoringClient(_ConversationAuthoringClientOperationsMixin):
"2025-11-15-preview". Note that overriding this default value may result in unsupported
behavior.
:paramtype api_version: str
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
Retry-After header is present.
"""

def __init__(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ def get_project_client(self, project_name: str) -> ConversationAuthoringProjectC
endpoint=self._config.endpoint,
credential=self._config.credential,
project_name=project_name,
api_version=self._config.api_version,
)


Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
# pylint: disable=line-too-long,useless-suppression
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------
"""Customize generated code here.
Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize
"""

from typing import Any, Optional, Union

from azure.core.polling import AsyncLROPoller
from azure.core.tracing.decorator import distributed_trace

from ._operations import DeploymentOperations as _GeneratedDeploymentOperations, JSON
from ...models import CreateDeploymentDetails


class DeploymentOperations(_GeneratedDeploymentOperations):
"""Deployment operations that handle both:
- 2025-11-15-preview: azureResourceIds = List[AssignedProjectResource]
- 2025-11-01: azureResourceIds = List[str]
"""

@distributed_trace
async def begin_deploy_project( # type: ignore[override]
self,
deployment_name: str,
body: Union[CreateDeploymentDetails, JSON, Any],
**kwargs: Any,
) -> AsyncLROPoller[None]:
api_version: Optional[str] = getattr(self._config, "api_version", None)

if not isinstance(body, CreateDeploymentDetails):
return await super().begin_deploy_project(
deployment_name=deployment_name,
body=body,
**kwargs,
)

# If no api_version or preview → use preview shape
if api_version in (None, "2025-11-15-preview"):
# For preview, we require assigned resources, because region is needed.
if body.azure_resource_ids is None:
# user tried to use GA-style strings but preview needs region
if getattr(body, "_azure_resource_ids_strings", None):
raise ValueError(
"For api_version '2025-11-15-preview', azure_resource_ids must "
"be a list of AssignedProjectResource (with region), not plain strings."
)
# Just send the model as-is
return await super().begin_deploy_project(
deployment_name=deployment_name,
body=body,
**kwargs,
)

# GA 2025-11-01 → azureResourceIds is List[str]
if api_version == "2025-11-01":
trained_model_label = body.trained_model_label

# Prefer GA-style strings if user gave them
str_ids = getattr(body, "_azure_resource_ids_strings", None)
if str_ids is not None:
azure_ids = str_ids
else:
# Otherwise derive from AssignedProjectResource list
azure_ids = None
if body.azure_resource_ids is not None:
azure_ids = [r.resource_id for r in body.azure_resource_ids]

json_body: JSON = {"trainedModelLabel": trained_model_label}
if azure_ids is not None:
json_body["azureResourceIds"] = azure_ids

return await super().begin_deploy_project(
deployment_name=deployment_name,
body=json_body, # GA wire
**kwargs,
)

# Any other version: fall back to default behavior
return await super().begin_deploy_project(
deployment_name=deployment_name,
body=body,
**kwargs,
)
Original file line number Diff line number Diff line change
Expand Up @@ -902,7 +902,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-
return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore

@distributed_trace_async
async def get_export_status(self, project_name: str, job_id: str, **kwargs: Any) -> _models.ExportProjectState:
async def _get_export_status(self, project_name: str, job_id: str, **kwargs: Any) -> _models.ExportProjectState:
"""Gets the status of an export job. Once job completes, returns the project metadata, and assets.

:param project_name: The new project name. Required.
Expand Down Expand Up @@ -965,7 +965,7 @@ async def get_export_status(self, project_name: str, job_id: str, **kwargs: Any)
return deserialized # type: ignore

@distributed_trace_async
async def get_import_status(self, project_name: str, job_id: str, **kwargs: Any) -> _models.ImportProjectState:
async def _get_import_status(self, project_name: str, job_id: str, **kwargs: Any) -> _models.ImportProjectState:
"""Gets the status for an import.

:param project_name: The new project name. Required.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize
"""
from ._project_op_patch import ProjectOperations

from ._deployment_op_patch import DeploymentOperations

def patch_sdk():
"""Do not remove from this file.
Expand All @@ -18,4 +18,4 @@ def patch_sdk():
"""


__all__ = ["ProjectOperations"]
__all__ = ["ProjectOperations", "DeploymentOperations"]
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
DataGenerationConnectionInfo,
DataGenerationSettings,
DeploymentDeleteFromResourcesState,
DeploymentResource,
DeploymentState,
EntitiesEvaluationSummary,
EntityEvaluationSummary,
Expand Down Expand Up @@ -125,7 +124,6 @@
"DataGenerationConnectionInfo",
"DataGenerationSettings",
"DeploymentDeleteFromResourcesState",
"DeploymentResource",
"DeploymentState",
"EntitiesEvaluationSummary",
"EntityEvaluationSummary",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ class AssignedProjectResource(_Model):
~azure.ai.language.conversations.authoring.models.DataGenerationConnectionInfo
"""

resource_id: str = rest_field(name="azureResourceId", visibility=["read"])
resource_id: str = rest_field(name="azureResourceId", visibility=["read", "create"])
"""The Azure resource ID of the language or AI resource. Required."""
region: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
"""The Azure resource region. Required."""
Expand All @@ -122,6 +122,7 @@ class AssignedProjectResource(_Model):
def __init__(
self,
*,
resource_id: str,
region: str,
assigned_aoai_resource: Optional["_models.DataGenerationConnectionInfo"] = None,
) -> None: ...
Expand Down Expand Up @@ -634,30 +635,30 @@ class CreateDeploymentDetails(_Model):

:ivar trained_model_label: Represents the trained model label. Required.
:vartype trained_model_label: str
:ivar assigned_resources: Represents the resources to be assigned to the deployment. If
provided, the deployment will be rolled out to the resources provided here as well as the
original resource in which the project is created.
:vartype assigned_resources:
list[~azure.ai.language.conversations.authoring.models.DeploymentResource]
:ivar azure_resource_ids: Represents the Language or AIService resource IDs that if
provided, the deployment will be rolled out to the resources provided here as
well as the original resource in which the project is created.
:vartype azure_resource_ids:
list[~azure.ai.language.conversations.authoring.models.AssignedProjectResource]
"""

trained_model_label: str = rest_field(
name="trainedModelLabel", visibility=["read", "create", "update", "delete", "query"]
)
"""Represents the trained model label. Required."""
assigned_resources: Optional[list["_models.DeploymentResource"]] = rest_field(
name="assignedResources", visibility=["read", "create", "update", "delete", "query"]
azure_resource_ids: Optional[list["_models.AssignedProjectResource"]] = rest_field(
name="azureResourceIds", visibility=["read", "create", "update", "delete", "query"]
)
"""Represents the resources to be assigned to the deployment. If provided, the deployment will be
rolled out to the resources provided here as well as the original resource in which the project
is created."""
"""Represents the Language or AIService resource IDs that if provided, the deployment
will be rolled out to the resources provided here as well as the original resource in which the
project is created."""

@overload
def __init__(
self,
*,
trained_model_label: str,
assigned_resources: Optional[list["_models.DeploymentResource"]] = None,
azure_resource_ids: Optional[list["_models.AssignedProjectResource"]] = None,
) -> None: ...

@overload
Expand Down Expand Up @@ -895,47 +896,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, **kwargs)


class DeploymentResource(_Model):
"""Represents an Azure resource assigned to a deployment.

:ivar resource_id: Represents the Azure resource Id. Required.
:vartype resource_id: str
:ivar region: Represents the resource region. Required.
:vartype region: str
:ivar assigned_aoai_resource: Represents the AOAI resource assigned for data generation.
:vartype assigned_aoai_resource:
~azure.ai.language.conversations.authoring.models.DataGenerationConnectionInfo
"""

resource_id: str = rest_field(name="resourceId", visibility=["read", "create", "update", "delete", "query"])
"""Represents the Azure resource Id. Required."""
region: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
"""Represents the resource region. Required."""
assigned_aoai_resource: Optional["_models.DataGenerationConnectionInfo"] = rest_field(
name="assignedAoaiResource", visibility=["read", "create", "update", "delete", "query"]
)
"""Represents the AOAI resource assigned for data generation."""

@overload
def __init__(
self,
*,
resource_id: str,
region: str,
assigned_aoai_resource: Optional["_models.DataGenerationConnectionInfo"] = None,
) -> None: ...

@overload
def __init__(self, mapping: Mapping[str, Any]) -> None:
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""

def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, **kwargs)


class DeploymentState(_Model):
"""Represents the state of a deployment job.

Expand Down
Loading