Skip to content

Commit fd4437e

Browse files
Merge pull request #278274 from laujan/259625-unified-backward-compatibility-qs-ht
259625 unified backward compatibility qs ht
2 parents c7f1a78 + 4921fae commit fd4437e

File tree

12 files changed

+409
-202
lines changed

12 files changed

+409
-202
lines changed

articles/ai-services/language-service/native-document-support/use-native-documents.md

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ author: laujan
66
manager: nitinme
77
ms.service: azure-ai-language
88
ms.topic: how-to
9-
ms.date: 02/21/2024
9+
ms.date: 06/20/2024
1010
ms.author: lajanuar
1111
---
1212

@@ -340,25 +340,28 @@ For this project, you need a **source document** uploaded to your **source conta
340340

341341
```json
342342
{
343-
"kind": "ExtractiveSummarization",
344-
"parameters": {
343+
"tasks": [
344+
{
345+
"kind": "ExtractiveSummarization",
346+
"parameters": {
345347
"sentenceCount": 6
346-
},
347-
"analysisInput":{
348-
"documents":[
349-
{
350-
"source":{
351-
"location":"{your-source-blob-SAS-URL}"
352-
},
353-
"targets":
354-
{
355-
"location":"{your-target-container-SAS-URL}",
356-
}
357-
}
358-
]
348+
}
359349
}
350+
],
351+
"analysisInput": {
352+
"documents": [
353+
{
354+
"source": {
355+
"location": "{your-source-blob-SAS-URL}"
356+
},
357+
"targets": {
358+
"location": "{your-target-container-SAS-URL}"
359+
}
360+
}
361+
]
360362
}
361-
```
363+
}
364+
```
362365

363366
### Run the POST request
364367

articles/ai-services/translator/containers/install-run.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ author: laujan
77
manager: nitinme
88
ms.service: azure-ai-translator
99
ms.topic: how-to
10-
ms.date: 04/19/2024
10+
ms.date: 06/20/2024
1111
ms.author: lajanuar
1212
recommendations: false
1313
keywords: on-premises, Docker, container, identify
@@ -312,7 +312,7 @@ The following example shows the formatting for the `docker run` command with pla
312312
|:-------------|:-------|:---:|
313313
| `[image]` | The container image you want to use. | `mcr.microsoft.com/azure-cognitive-services/translator/text-translation` |
314314
| `{LICENSE_MOUNT}` | The path where the license is downloaded, and mounted. | `/host/license:/path/to/license/directory` |
315-
| `{MODEL_MOUNT_PATH}`| The path where the machine translation models are downloaded, and mounted. Your directory structure must be formatted as **/usr/local/models** | `/host/translator/models:/usr/local/models`|
315+
| `{MODEL_MOUNT_PATH}`| The path where the machine translation models are downloaded, and mounted. Your directory structure must be formatted as **/usr/local/models** | `/host/translator/models:/usr/local/models`|
316316
| `{ENDPOINT_URI}` | The endpoint for authenticating your service request. You can find it on your resource's **Key and endpoint** page, in the Azure portal. | `https://<your-custom-subdomain>.cognitiveservices.azure.com` |
317317
| `{API_KEY}` | The key for your Text Translation resource. You can find it on your resource's **Key and endpoint** page, in the Azure portal. |`{string}`|
318318
| `{LANGUAGES_LIST}` | List of language codes separated by commas. It's mandatory to have English (en) language as part of the list.| `en`, `fr`, `it`, `zu`, `uk` |
@@ -477,15 +477,15 @@ If you installed Docker Desktop CLI, it includes Docker compose and its prerequi
477477
image: mcr.microsoft.com/azure-cognitive-services/textanalytics/language:latest
478478
environment:
479479
- EULA=accept
480-
- billing={TRANSLATOR_ENDPOINT_URI}
481-
- apiKey={TRANSLATOR_KEY}
480+
- billing={LANGUAGE_RESOURCE_ENDPOINT_URI}
481+
- apiKey={LANGUAGE_RESOURCE_KEY}
482482
azure-ai-read:
483483
container_name: azure-ai-read
484484
image: mcr.microsoft.com/azure-cognitive-services/vision/read:latest
485485
environment:
486486
- EULA=accept
487-
- billing={TRANSLATOR_ENDPOINT_URI}
488-
- apiKey={TRANSLATOR_KEY}
487+
- billing={COMPUTER_VISION_ENDPOINT_URI}
488+
- apiKey={COMPUTER_VISION_KEY}
489489
```
490490
491491
1. Open a terminal navigate to the `container-environment` folder, and start the containers with the following `docker-compose` command:

articles/ai-services/translator/document-translation/document-sdk-overview.md

Lines changed: 48 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ manager: nitinme
77
ms.service: azure-ai-translator
88
ms.custom: devx-track-python
99
ms.topic: conceptual
10-
ms.date: 05/21/2024
10+
ms.date: 06/19/2024
1111
ms.author: lajanuar
1212
recommendations: false
1313
---
@@ -26,9 +26,9 @@ Document Translation is a cloud-based REST API feature of the Azure AI Translato
2626
Document Translation SDK supports the following programming languages:
2727

2828
| Language → SDK version | Package|Client library| Supported API version|
29-
|:----------------------:|:----------|:----------|:-------------|
29+
|:----------------------|:----------|:----------|:-------------|
3030
|🆕 [.NET/C# → 2.0.0-beta.1](https://azuresdkdocs.blob.core.windows.net/$web/dotnet/Azure.AI.Translation.Document/2.0.0-beta.1/index.html)| [NuGet](https://www.nuget.org/packages/Azure.AI.Translation.Document/2.0.0-beta.1) | [Azure SDK for .NET](/dotnet/api/overview/azure/ai.translation.document-readme?branch=main&view=azure-dotnet-preview&preserve-view=true) | Document Translation `api-version=2024-05-01`|
31-
|🆕 [Python → 1.1.0b1](https://azuresdkdocs.blob.core.windows.net/$web/python/azure-ai-translation-document/1.1.0b1/index.html)|[PyPi](https://pypi.org/project/azure-ai-translation-document/1.1.0b1/)|[Azure SDK for Python](/python/api/overview/azure/ai-translation-document-readme?view=azure-python&preserve-view=true)|Document Translation `api-version=2024-05-01`|
31+
|🆕 [Python → 1.1.0b1](https://azuresdkdocs.blob.core.windows.net/$web/python/azure-ai-translation-document/1.1.0b1/index.html)|[PyPi](https://pypi.org/project/azure-ai-translation-document/1.1.0b1/)|[Azure SDK for Python](/python/api/overview/azure/ai-translation-document-readme?view=azure-python-preview&preserve-view=true)|Document Translation `api-version=2024-05-01`|
3232

3333
## Changelog and release history
3434

@@ -50,11 +50,11 @@ This section provides a version-based description of Document Translation featur
5050
**Version 1.1.0b1** </br>
5151
**2024-05-07**
5252

53-
##### [**Changelog/Release History**](https://github.com/Azure/azure-sdk-for-python/blob/azure-ai-translation-document_1.0.0/sdk/translation/azure-ai-translation-document/CHANGELOG.md)
53+
##### [**Changelog/Release History**](https://github.com/Azure/azure-sdk-for-python/blob/azure-ai-translation-document_1.1.0b1/sdk/translation/azure-ai-translation-document/CHANGELOG.md)
5454

55-
##### [README](https://github.com/Azure/azure-sdk-for-python/blob/azure-ai-translation-document_1.0.0/sdk/translation/azure-ai-translation-document/README.md)
55+
##### [README](https://github.com/Azure/azure-sdk-for-python/blob/azure-ai-translation-document_1.1.0b1/sdk/translation/azure-ai-translation-document/samples/README.md)
5656

57-
##### [Samples](https://github.com/Azure/azure-sdk-for-python/tree/azure-ai-translation-document_1.0.0/sdk/translation/azure-ai-translation-document/samples)
57+
##### [Samples](https://github.com/Azure/azure-sdk-for-python/tree/azure-ai-translation-document_1.1.0b1/sdk/translation/azure-ai-translation-document/samples)
5858

5959
---
6060

@@ -77,7 +77,7 @@ Install-Package Azure.AI.Translation.Document -Version 2.0.0-beta.1
7777
### [Python](#tab/python)
7878

7979
```python
80-
pip install azure-ai-translation-document==1.0.0
80+
pip install azure-ai-translation-document==1.1.0b1
8181
```
8282

8383
---
@@ -107,6 +107,8 @@ from azure.core.credentials import AzureKeyCredential
107107

108108
Create an instance of the `DocumentTranslationClient` object to interact with the Document Translation SDK, and then call methods on that client object to interact with the service. The `DocumentTranslationClient` is the primary interface for using the Document Translation client library. It provides both synchronous and asynchronous methods to perform operations.
109109

110+
***Asynchronous batch translation***
111+
110112
```csharp
111113
private static readonly string endpoint = "<your-custom-endpoint>";
112114
private static readonly string key = "<your-key>";
@@ -115,15 +117,37 @@ DocumentTranslationClient client = new DocumentTranslationClient(new Uri(endpoin
115117

116118
```
117119

120+
***Synchronous single document translation***
121+
122+
```csharp
123+
private static readonly string endpoint = "<your-custom-endpoint>";
124+
private static readonly string key = "<your-key>";
125+
126+
SingleDocumentTranslationClient client = new SingleDocumentTranslationClient(new Uri(endpoint), new AzureKeyCredential(apiKey));
127+
128+
```
129+
118130
### [Python](#tab/python)
119131

120132
Create an instance of the `DocumentTranslationClient` object to interact with the Document Translation SDK, and then call methods on that client object to interact with the service. The `DocumentTranslationClient` is the primary interface for using the Document Translation client library. It provides both synchronous and asynchronous methods to perform operations.
121133

134+
***Asynchronous batch translation***
135+
136+
```python
137+
endpoint = "<endpoint>"
138+
key = "<apiKey>"
139+
140+
client = DocumentTranslationClient(endpoint, AzureKeyCredential(key))
141+
142+
```
143+
144+
***Synchronous single document translation***
145+
122146
```python
123-
endpoint = "<endpoint>"
124-
key = "<apiKey>"
147+
endpoint = "<endpoint>"
148+
key = "<apiKey>"
125149

126-
client = DocumentTranslationClient(endpoint, AzureKeyCredential(key))
150+
client = SingleDocumentTranslationClient(endpoint, AzureKeyCredential(key))
127151

128152
```
129153

@@ -133,7 +157,9 @@ client = DocumentTranslationClient(endpoint, AzureKeyCredential(key))
133157

134158
### [C#/.NET](#tab/csharp)
135159

136-
The Document Translation interface requires the following input:
160+
***Asynchronous batch translation***
161+
162+
Document Translation batch interfaces require the following input:
137163

138164
1. Upload your files to an Azure Blob Storage source container (sourceUri).
139165
1. Provide a target container where the translated documents can be written (targetUri).
@@ -148,9 +174,15 @@ string targetLanguage = "<target-language-code>";
148174
DocumentTranslationInput input = new DocumentTranslationInput(sourceUri, targetUri, targetLanguage)
149175
```
150176

177+
***Synchronous single document translation***
178+
179+
[Single document translation](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/translation/Azure.AI.Translation.Document/samples/Sample5_SynchronousTranslation.md)
180+
151181
### [Python](#tab/python)
152182

153-
The Document Translation interface requires the following input:
183+
***Asynchronous batch translation***
184+
185+
Document Translation batch interfaces require the following input:
154186

155187
1. Upload your files to an Azure Blob Storage source container (sourceUri).
156188
1. Provide a target container where the translated documents can be written (targetUri).
@@ -166,6 +198,10 @@ result = poller.result()
166198

167199
```
168200

201+
***Synchronous single document translation***
202+
203+
[Single document translation](https://github.com/Azure/azure-sdk-for-python/blob/azure-ai-translation-document_1.1.0b1/sdk/translation/azure-ai-translation-document/samples/sample_single_document_translation.py)
204+
169205
---
170206

171207
## Help options

0 commit comments

Comments
 (0)