Skip to content

[Text Authoring] Create dotnet sdk preview 20250515 #51146

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 34 commits into
base: main
Choose a base branch
from

Conversation

amber-Chen-86
Copy link
Member

Contributing to the Azure SDK

Please see our CONTRIBUTING.md if you are not familiar with contributing to this repository or have questions.

For specific information about pull request etiquette and best practices, see this section.

@github-actions github-actions bot added Cognitive - Language Community Contribution Community members are working on the issue customer-reported Issues that are reported by GitHub users external to the Azure organization. labels Jul 8, 2025
Copy link

github-actions bot commented Jul 8, 2025

Thank you for your contribution @amber-Chen-86! We will review the pull request and get back to you soon.

jsquire
jsquire previously requested changes Jul 9, 2025
Copy link
Member

@jsquire jsquire left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@amber-Chen-86 :

Your account lacks the public GitHub organization memberships and permissions required of an internal contributor. Please review the Azure SDK onboarding documentation and use the associated Teams channel for support.

You can verify the state of your account by running the Validate-AzsdkCodeOwner script from the Azure SDK tools repository.

Please also be sure to add yourself to CODEOWNERS for this library, if you will be maintaining it going forward.

@amber-Chen-86
Copy link
Member Author

amber-Chen-86 commented Jul 9, 2025 via email

@amber-Chen-86
Copy link
Member Author

amber-Chen-86 commented Jul 9, 2025

Thank you, @jsquire. I've joined the public GitHub organization memberships as required and submitted the necessary permission requests.

@amber-Chen-86 amber-Chen-86 marked this pull request as draft July 9, 2025 15:18
Copy link

github-actions bot commented Jul 11, 2025

API Change Check

APIView identified API level changes in this PR and created the following API reviews

Azure.AI.Language.Text.Authoring

@jsquire jsquire removed customer-reported Issues that are reported by GitHub users external to the Azure organization. Community Contribution Community members are working on the issue labels Jul 11, 2025
@jsquire jsquire dismissed their stale review July 11, 2025 16:03

Account issues confirmed resolved.

@amber-Chen-86 amber-Chen-86 changed the title Create text authoring sdk preview 20250515 [Text Authoring] Create dotnet sdk preview 20250515 Jul 17, 2025
@amber-Chen-86 amber-Chen-86 marked this pull request as ready for review July 18, 2025 23:27
@Copilot Copilot AI review requested due to automatic review settings July 18, 2025 23:27
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This pull request creates a preview SDK release (version 20250515) for the Azure.AI.Language.Text.Authoring SDK. The PR updates the API specification reference and refreshes test data with new endpoints, project names, and API versions.

Reviewed Changes

Copilot reviewed 121 out of 130 changed files in this pull request and generated 1 comment.

  • Updated API specification commit reference in tsp-location.yaml
  • Reorganized using statements in the test file for better readability
  • Updated test data with new project names, container names, and API version endpoints
  • Added new test methods for raw string import, model evaluation results, project export, and deployment retrieval
  • Refreshed all session recordings with updated URLs, dates, and response data
File Description
tsp-location.yaml Updates API specification commit hash to point to newer version
TextAuthoringClientLiveTest.cs Reorganizes imports, updates test project names/containers, adds new test methods
Session recording files Updates all recorded test sessions with new API version, endpoints, and test data

internal AzureAILanguageQuestionAnsweringContext() { }
public static Azure.AI.Language.QuestionAnswering.AzureAILanguageQuestionAnsweringContext Default { get { throw null; } }
protected override bool TryGetTypeBuilderCore(System.Type type, out System.ClientModel.Primitives.ModelReaderWriterTypeBuilder builder) { throw null; }
public AzureAILanguageQuestionAnsweringContext() { }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we have changes here?


### Features Added

### Breaking Changes
- Added import feature for raw json string.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure I understand, can you expand for which usecase. AFAI we do not have any new changes except the new API version for Text Auth

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, when we had bug bash session last time, Ashour mentioned we may need to add a function of importing Json String directly for Conversations Authoring SDK. If we only support importing structured object, it is not convenient when importing large json project.
So I added an import Json String to Conversation Authoring, and I also added the same function here in Text Authoring, because I think they have same concern.
Do you think it is acceptable? Thank you.

|1.0.0-beta.1 | 2022-05-01, 2023-04-01, 2023-11-15-preview, 2024-11-15-preview (default)
|1.0.0-beta.2 | 2022-05-01, 2023-04-01, 2023-11-15-preview, 2024-11-15-preview, 2025-05-15-preview (default)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should not have 2023-11-15-preview. Do we still have that?

Comment on lines +153 to +192
You can familiarize yourself with different APIs using [Samples](https://github.com/amber-ccc/azure-sdk-for-net/blob/amber/create_text_authoring_sdk_preview_20250515/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/samples).

* [Create a New Project (Sync)](https://github.com/amber-ccc/azure-sdk-for-net/blob/amber/create_text_authoring_sdk_preview_20250515/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/samples/Sample1_TextAuthoring_CreateProject.md)
* [Create a New Project (Async)](https://github.com/amber-ccc/azure-sdk-for-net/blob/amber/create_text_authoring_sdk_preview_20250515/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/samples/Sample1_TextAuthoring_CreateProjectAsync.md)
* [Import a Project (Sync)](https://github.com/amber-ccc/azure-sdk-for-net/blob/amber/create_text_authoring_sdk_preview_20250515/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/samples/Sample2_TextAuthoring_Import.md)
* [Import a Project (Async)](https://github.com/amber-ccc/azure-sdk-for-net/blob/amber/create_text_authoring_sdk_preview_20250515/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/samples/Sample2_TextAuthoring_ImportAsync.md)
* [Export a Project (Sync)](https://github.com/amber-ccc/azure-sdk-for-net/blob/amber/create_text_authoring_sdk_preview_20250515/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/samples/Sample3_TextAuthoring_Export.md)
* [Export a Project (Async)](https://github.com/amber-ccc/azure-sdk-for-net/blob/amber/create_text_authoring_sdk_preview_20250515/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/samples/Sample3_TextAuthoring_ExportAsync.md)
* [Get Project Details (Sync)](https://github.com/amber-ccc/azure-sdk-for-net/blob/amber/create_text_authoring_sdk_preview_20250515/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/samples/Sample4_TextAuthoring_GetProject.md)
* [Get Project Details (Async)](https://github.com/amber-ccc/azure-sdk-for-net/blob/amber/create_text_authoring_sdk_preview_20250515/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/samples/Sample4_TextAuthoring_GetProjectAsync.md)
* [Delete a Project (Sync)](https://github.com/amber-ccc/azure-sdk-for-net/blob/amber/create_text_authoring_sdk_preview_20250515/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/samples/Sample5_TextAuthoring_DeleteProject.md)
* [Delete a Project (Async)](https://github.com/amber-ccc/azure-sdk-for-net/blob/amber/create_text_authoring_sdk_preview_20250515/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/samples/Sample5_TextAuthoring_DeleteProjectAsync.md)
* [Train a Model (Sync)](https://github.com/amber-ccc/azure-sdk-for-net/blob/amber/create_text_authoring_sdk_preview_20250515/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/samples/Sample6_TextAuthoring_Train.md)
* [Train a Model (Async)](https://github.com/amber-ccc/azure-sdk-for-net/blob/amber/create_text_authoring_sdk_preview_20250515/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/samples/Sample6_TextAuthoring_TrainAsync.md)
* [Cancel Training Job (Sync)](https://github.com/amber-ccc/azure-sdk-for-net/blob/amber/create_text_authoring_sdk_preview_20250515/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/samples/Sample7_TextAuthoring_CancelTrainingJob.md)
* [Cancel Training Job (Async)](https://github.com/amber-ccc/azure-sdk-for-net/blob/amber/create_text_authoring_sdk_preview_20250515/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/samples/Sample7_TextAuthoring_CancelTrainingJobAsync.md)
* [Get Model Evaluation Summary (Sync)](https://github.com/amber-ccc/azure-sdk-for-net/blob/amber/create_text_authoring_sdk_preview_20250515/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/samples/Sample8_TextAuthoring_GetModelEvaluationSummary.md)
* [Get Model Evaluation Summary (Async)](https://github.com/amber-ccc/azure-sdk-for-net/blob/amber/create_text_authoring_sdk_preview_20250515/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/samples/Sample8_TextAuthoring_GetModelEvaluationSummaryAsync.md)
* [Get Model Evaluation Results (Sync)](https://github.com/amber-ccc/azure-sdk-for-net/blob/amber/create_text_authoring_sdk_preview_20250515/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/samples/Sample9_TextAuthoring_GetModelEvaluationResults.md)
* [Get Model Evaluation Results (Async)](https://github.com/amber-ccc/azure-sdk-for-net/blob/amber/create_text_authoring_sdk_preview_20250515/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/samples/Sample9_TextAuthoring_GetModelEvaluationResultsAsync.md)
* [Load Snapshot (Sync)](https://github.com/amber-ccc/azure-sdk-for-net/blob/amber/create_text_authoring_sdk_preview_20250515/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/samples/Sample10_TextAuthoring_LoadSnapshot.md)
* [Load Snapshot (Async)](https://github.com/amber-ccc/azure-sdk-for-net/blob/amber/create_text_authoring_sdk_preview_20250515/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/samples/Sample10_TextAuthoring_LoadSnapshotAsync.md)
* [Delete a Trained Model (Sync)](https://github.com/amber-ccc/azure-sdk-for-net/blob/amber/create_text_authoring_sdk_preview_20250515/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/samples/Sample11_TextAuthoring_DeleteTrainedModel.md)
* [Delete a Trained Model (Async)](https://github.com/amber-ccc/azure-sdk-for-net/blob/amber/create_text_authoring_sdk_preview_20250515/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/samples/Sample11_TextAuthoring_DeleteTrainedModelAsync.md)
* [Swap Deployments (Sync)](https://github.com/amber-ccc/azure-sdk-for-net/blob/amber/create_text_authoring_sdk_preview_20250515/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/samples/Sample12_TextAuthoring_SwapDeployments.md)
* [Swap Deployments (Async)](https://github.com/amber-ccc/azure-sdk-for-net/blob/amber/create_text_authoring_sdk_preview_20250515/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/samples/Sample12_TextAuthoring_SwapDeploymentsAsync.md)
* [Delete a Deployment (Sync)](https://github.com/amber-ccc/azure-sdk-for-net/blob/amber/create_text_authoring_sdk_preview_20250515/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/samples/Sample13_TextAuthoring_DeleteDeployment.md)
* [Delete a Deployment (Async)](https://github.com/amber-ccc/azure-sdk-for-net/blob/amber/create_text_authoring_sdk_preview_20250515/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/samples/Sample13_TextAuthoring_DeleteDeploymentAsync.md)
* [Deploy a Project (Sync)](https://github.com/amber-ccc/azure-sdk-for-net/blob/amber/create_text_authoring_sdk_preview_20250515/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/samples/Sample14_TextAuthoring_DeployProject.md)
* [Deploy a Project (Async)](https://github.com/amber-ccc/azure-sdk-for-net/blob/amber/create_text_authoring_sdk_preview_20250515/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/samples/Sample14_TextAuthoring_DeployProjectAsync.md)
* [Get Deployment Details (Sync)](https://github.com/amber-ccc/azure-sdk-for-net/blob/amber/create_text_authoring_sdk_preview_20250515/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/samples/Sample15_TextAuthoring_GetDeployment.md)
* [Get Deployment Details (Async)](https://github.com/amber-ccc/azure-sdk-for-net/blob/amber/create_text_authoring_sdk_preview_20250515/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/samples/Sample15_TextAuthoring_GetDeploymentAsync.md)
* [Assign Deployment Resources (Sync)](https://github.com/amber-ccc/azure-sdk-for-net/blob/amber/create_text_authoring_sdk_preview_20250515/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/samples/Sample16_TextAuthoring_AssignDeploymentResources.md)
* [Assign Deployment Resources (Async)](https://github.com/amber-ccc/azure-sdk-for-net/blob/amber/create_text_authoring_sdk_preview_20250515/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/samples/Sample16_TextAuthoring_AssignDeploymentResourcesAsync.md)
* [Get Deployment Resources Assignment Status (Sync)](https://github.com/amber-ccc/azure-sdk-for-net/blob/amber/create_text_authoring_sdk_preview_20250515/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/samples/Sample17_TextAuthoring_GetAssignDeploymentResourcesStatus.md)
* [Get Deployment Resources Assignment Status (Async)](https://github.com/amber-ccc/azure-sdk-for-net/blob/amber/create_text_authoring_sdk_preview_20250515/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/samples/Sample17_TextAuthoring_GetAssignDeploymentResourcesStatusAsync.md)
* [Unassign Deployment Resources (Sync)](https://github.com/amber-ccc/azure-sdk-for-net/blob/amber/create_text_authoring_sdk_preview_20250515/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/samples/Sample18_TextAuthoring_UnassignDeploymentResources.md)
* [Unassign Deployment Resources (Async)](https://github.com/amber-ccc/azure-sdk-for-net/blob/amber/create_text_authoring_sdk_preview_20250515/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/samples/Sample18_TextAuthoring_UnassignDeploymentResourcesAsync.md)
* [Get Deployment Resources Unassignment Status (Sync)](https://github.com/amber-ccc/azure-sdk-for-net/blob/amber/create_text_authoring_sdk_preview_20250515/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/samples/Sample19_TextAuthoring_GetUnassignDeploymentResourcesStatus.md)
* [Get Deployment Resources Unassignment Status (Async)](https://github.com/amber-ccc/azure-sdk-for-net/blob/amber/create_text_authoring_sdk_preview_20250515/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/samples/Sample19_TextAuthoring_GetUnassignDeploymentResourcesStatusAsync.md)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These links should not be referring to your branch amber. Use main. For the ones which are being added as part of this commit, I think we should be able to add them after merge.

string secondDeploymentName = "DeploymentB";
```C# Snippet:Sample12_TextAuthoring_SwapDeployments
string projectName = "MySwapProject";
string firstDeploymentName = "Deployment1";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same applies here

```C# Snippet:CreateTextAuthoringClientForSpecificApiVersion
Uri endpoint = new Uri("{endpoint}");
AzureKeyCredential credential = new AzureKeyCredential("{api-key}");
TextAnalysisAuthoringClientOptions options = new TextAnalysisAuthoringClientOptions(TextAnalysisAuthoringClientOptions.ServiceVersion.V2024_11_15_Preview);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update to newest version


```C# Snippet:CreateTextAuthoringClientForSpecificApiVersion
Uri endpoint = new Uri("{endpoint}");
AzureKeyCredential credential = new AzureKeyCredential("{api-key}");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we have a code snippet on how to call with AAD? If so, you can either add it here, or add a link to the snipper

TextAnalysisAuthoringClient client = new TextAnalysisAuthoringClient(endpoint, credential, options);
```

## Retrieve Deployment Details Asynchronously
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need a separate file. Why not add to the same sample for sync?

The readme can be Retrieving Deployment Details in Azure AI Language Text


This sample demonstrates how to assign deployment resources synchronously using the `Azure.AI.Language.Text.Authoring` SDK.

## Create an `AuthoringClient` using AAD Authentication
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here we only have AAD, Let's have both Key and AAD in all pages. or just one common sample

@@ -22,9 +22,9 @@ public DataGenerationConnectionInfoKind(string value)
_value = value ?? throw new ArgumentNullException(nameof(value));
}

private const string AzureOpenAIValue = "azureOpenAI";
private const string AzureOpenAIValue = "AzureOpenAI";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why?

@amber-Chen-86 amber-Chen-86 marked this pull request as draft July 22, 2025 20:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants