Skip to content

Commit 195db0b

Browse files
authored
Merge pull request #1137 from MicrosoftDocs/main
Merge main to live, 4 AM
2 parents a85d81c + 7c09fc5 commit 195db0b

File tree

23 files changed

+560
-254
lines changed

23 files changed

+560
-254
lines changed

articles/ai-services/.openpublishing.redirection.ai-services.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -769,6 +769,16 @@
769769
"source_path_from_root": "/articles/ai-services/speech-service/video-translation-studio.md",
770770
"redirect_url": "/azure/ai-services/speech-service/video-translation-get-started",
771771
"redirect_document_id": true
772+
},
773+
{
774+
"source_path_from_root": "/articles/ai-services/qnamaker/how-to/migrate-to-openai.md",
775+
"redirect_url": "/azure/ai-services/qnamaker/overview/overview",
776+
"redirect_document_id": true
777+
},
778+
{
779+
"source_path_from_root": "/articles/ai-services/language-service/question-answering/how-to/azure-openai-integration.md",
780+
"redirect_url": "/azure/ai-services/language-service/question-answering/overview",
781+
"redirect_document_id": true
772782
}
773783
]
774784
}

articles/ai-services/language-service/custom-text-analytics-for-health/overview.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,10 @@ ms.author: jboback
1212
ms.custom: language-service-custom-ta4h
1313
---
1414

15-
# What is custom Text Analytics for health?
15+
# What is custom Text Analytics for health?
16+
17+
> [!NOTE]
18+
> Custom text analytics for health (preview) will be retired on 10 January 2025, please transition to other custom model training services, such as custom named entity recognition in Azure AI Language, by that date. From now to 10 January 2025, you can continue to use custom text analytics for health (preview) in your existing projects without disruption. You can’t create new projects. On 10 January 2025 – workloads running on custom text analytics for health (preview) will be deleted and associated project data will be lost.
1619
1720
Custom Text Analytics for health is one of the custom features offered by [Azure AI Language](../overview.md). It is a cloud-based API service that applies machine-learning intelligence to enable you to build custom models on top of [Text Analytics for health](../text-analytics-for-health/overview.md) for custom healthcare entity recognition tasks.
1821

articles/ai-services/language-service/custom-text-analytics-for-health/quickstart.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ zone_pivot_groups: usage-custom-language-features
1515

1616
# Quickstart: custom Text Analytics for health
1717

18+
> [!NOTE]
19+
> Custom text analytics for health (preview) will be retired on 10 January 2025, please transition to other custom model training services, such as custom named entity recognition in Azure AI Language, by that date. From now to 10 January 2025, you can continue to use custom text analytics for health (preview) in your existing projects without disruption. You can’t create new projects. On 10 January 2025 – workloads running on custom text analytics for health (preview) will be deleted and associated project data will be lost.
20+
1821
Use this article to get started with creating a custom Text Analytics for health project where you can train custom models on top of Text Analytics for health for custom entity recognition. A model is artificial intelligence software that's trained to do a certain task. For this system, the models extract healthcare related named entities and are trained by learning from labeled data.
1922

2023
In this article, we use Language Studio to demonstrate key concepts of custom Text Analytics for health. As an example we’ll build a custom Text Analytics for health model to extract the Facility or treatment location from short discharge notes.

articles/ai-services/language-service/question-answering/how-to/azure-openai-integration.md

Lines changed: 0 additions & 76 deletions
This file was deleted.

articles/ai-services/language-service/question-answering/how-to/migrate-qnamaker.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,6 @@ ms.custom: language-service-question-answering
1111

1212
# Migrate from QnA Maker knowledge bases to custom question answering
1313

14-
> [!NOTE]
15-
> You can also migrate to [Azure OpenAI](../../../qnamaker/How-To/migrate-to-openai.md).
16-
1714
Custom question answering, a feature of Azure AI Language was introduced in May 2021 with several new capabilities including enhanced relevance using a deep learning ranker, precise answers, and end-to-end region support. Each custom question answering project is equivalent to a knowledge base in QnA Maker. You can easily migrate knowledge bases from a QnA Maker resource to custom question answering projects within a [language resource](https://aka.ms/create-language-resource). You can also choose to migrate knowledge bases from multiple QnA Maker resources to a specific language resource.
1815

1916
To successfully migrate knowledge bases, **the account performing the migration needs contributor access to the selected QnA Maker and language resource**. When a knowledge base is migrated, the following details are copied to the new custom question answering project:

articles/ai-services/language-service/question-answering/overview.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,6 @@ ms.custom: language-service-question-answering
1313

1414
# What is custom question answering?
1515

16-
> [!NOTE]
17-
> [Azure OpenAI On Your Data](../../openai/concepts/use-your-data.md) utilizes large language models (LLMs) to produce similar results to Custom Question Answering. If you wish to connect an existing Custom Question Answering project to Azure OpenAI On Your Data, please check out our [guide]( how-to/azure-openai-integration.md).
18-
1916
Custom question answering provides cloud-based Natural Language Processing (NLP) that allows you to create a natural conversational layer over your data. It is used to find appropriate answers from customer input or from a project.
2017

2118
Custom question answering is commonly used to build conversational client applications, which include social media applications, chat bots, and speech-enabled desktop applications. This offering includes features like enhanced relevance using a deep learning ranker, precise answers, and end-to-end region support.

articles/ai-services/language-service/question-answering/quickstart/sdk.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,6 @@ zone_pivot_groups: custom-qna-quickstart
1515

1616
# Quickstart: custom question answering
1717

18-
> [!NOTE]
19-
> [Azure OpenAI On Your Data](../../../openai/concepts/use-your-data.md) utilizes large language models (LLMs) to produce similar results to Custom Question Answering. If you wish to connect an existing Custom Question Answering project to Azure OpenAI On Your Data, please check out our [guide](../how-to/azure-openai-integration.md).
20-
2118
> [!NOTE]
2219
> Are you looking to migrate your workloads from QnA Maker? See our [migration guide](../how-to/migrate-qnamaker-to-question-answering.md) for information on feature comparisons and migration steps.
2320

articles/ai-services/language-service/sentiment-opinion-mining/custom/quickstart.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ zone_pivot_groups: usage-custom-language-features
1515

1616
# Quickstart: Custom sentiment analysis (preview)
1717

18+
> [NOTE]
19+
> Custom sentiment analysis (preview) will be retired on 10 January 2025, please transition to other custom model training services, such as custom text classification in Azure AI Language, by that date. From now to 10 January 2025, you can continue to use custom sentiment analysis (preview) in your existing projects without disruption. You can’t create new projects. On 10 January 2025 – workloads running on custom sentiment analysis (preview) will be deleted and associated project data will be lost.
20+
1821
Use this article to get started with creating a Custom sentiment analysis project where you can train custom models for detecting the sentiment of text. A model is artificial intelligence software that's trained to do a certain task. For this system, the models classify text, and are trained by learning from tagged data.
1922

2023
::: zone pivot="language-studio"

articles/ai-services/openai/includes/text-to-speech-javascript.md

Lines changed: 24 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -14,24 +14,12 @@ recommendations: false
1414

1515
## Prerequisites
1616

17-
#### [JavaScript](#tab/javascript)
18-
19-
- An Azure subscription - [Create one for free](https://azure.microsoft.com/free/cognitive-services?azure-portal=true)
20-
- [LTS versions of Node.js](https://github.com/nodejs/release#release-schedule)
21-
- An Azure OpenAI resource created in a supported region (see [Region availability](/azure/ai-services/openai/concepts/models#model-summary-table-and-region-availability)). For more information, see [Create a resource and deploy a model with Azure OpenAI](../how-to/create-resource.md).
22-
23-
24-
#### [TypeScript](#tab/typescript)
25-
2617
- An Azure subscription - [Create one for free](https://azure.microsoft.com/free/cognitive-services?azure-portal=true)
2718
- [LTS versions of Node.js](https://github.com/nodejs/release#release-schedule)
28-
- [TypeScript](https://www.typescriptlang.org/download/)
19+
- [Azure CLI](/cli/azure/install-azure-cli) used for passwordless authentication in a local development environment, create the necessary context by signing in with the Azure CLI.
2920
- An Azure OpenAI resource created in a supported region (see [Region availability](/azure/ai-services/openai/concepts/models#model-summary-table-and-region-availability)). For more information, see [Create a resource and deploy a model with Azure OpenAI](../how-to/create-resource.md).
3021

3122

32-
33-
---
34-
3523
## Set up
3624

3725
### Retrieve key and endpoint
@@ -104,32 +92,35 @@ Your app's _package.json_ file will be updated with the dependencies.
10492

10593
## Create a speech file
10694

95+
10796

108-
109-
#### [JavaScript](#tab/javascript)
97+
#### [Microsoft Entra ID](#tab/javascript-keyless)
11098

11199
1. Create a new file named _Text-to-speech.js_ and open it in your preferred code editor. Copy the following code into the _Text-to-speech.js_ file:
112100

113101
```javascript
114-
require("dotenv/config");
115102
const { writeFile } = require("fs/promises");
116103
const { AzureOpenAI } = require("openai");
104+
const { DefaultAzureCredential, getBearerTokenProvider } = require("@azure/identity");
117105
require("openai/shims/node");
118106

119107
// You will need to set these environment variables or edit the following values
120108
const endpoint = process.env["AZURE_OPENAI_ENDPOINT"] || "<endpoint>";
121-
const apiKey = process.env["AZURE_OPENAI_API_KEY"] || "<api key>";
122-
const speechFilePath =
123-
process.env["SPEECH_FILE_PATH"] || "<path to save the speech file>";
109+
const speechFilePath = "<path to save the speech file>";
124110

125111
// Required Azure OpenAI deployment name and API version
126112
const deploymentName = "tts";
127113
const apiVersion = "2024-08-01-preview";
128114

115+
// keyless authentication
116+
const credential = new DefaultAzureCredential();
117+
const scope = "https://cognitiveservices.azure.com/.default";
118+
const azureADTokenProvider = getBearerTokenProvider(credential, scope);
119+
129120
function getClient() {
130121
return new AzureOpenAI({
131122
endpoint,
132-
apiKey,
123+
azureADTokenProvider,
133124
apiVersion,
134125
deployment: deploymentName,
135126
});
@@ -169,30 +160,26 @@ Your app's _package.json_ file will be updated with the dependencies.
169160
```console
170161
node Text-to-speech.js
171162
```
172-
173163

174-
#### [TypeScript](#tab/typescript)
164+
#### [API key](#tab/javascript-key)
175165

176-
1. Create a new file named _Text-to-speech.ts_ and open it in your preferred code editor. Copy the following code into the _Text-to-speech.ts_ file:
166+
1. Create a new file named _Text-to-speech.js_ and open it in your preferred code editor. Copy the following code into the _Text-to-speech.js_ file:
177167

178-
```typescript
179-
import "dotenv/config";
180-
import { writeFile } from "fs/promises";
181-
import { AzureOpenAI } from "openai";
182-
import type { SpeechCreateParams } from "openai/resources/audio/speech";
183-
import "openai/shims/node";
168+
```javascript
169+
const { writeFile } = require("fs/promises");
170+
const { AzureOpenAI } = require("openai");
171+
require("openai/shims/node");
184172
185173
// You will need to set these environment variables or edit the following values
186174
const endpoint = process.env["AZURE_OPENAI_ENDPOINT"] || "<endpoint>";
187175
const apiKey = process.env["AZURE_OPENAI_API_KEY"] || "<api key>";
188-
const speechFilePath =
189-
process.env["SPEECH_FILE_PATH"] || "<path to save the speech file>";
176+
const speechFilePath = "<path to save the speech file>";
190177
191178
// Required Azure OpenAI deployment name and API version
192179
const deploymentName = "tts";
193180
const apiVersion = "2024-08-01-preview";
194181
195-
function getClient(): AzureOpenAI {
182+
function getClient() {
196183
return new AzureOpenAI({
197184
endpoint,
198185
apiKey,
@@ -202,9 +189,9 @@ Your app's _package.json_ file will be updated with the dependencies.
202189
}
203190
204191
async function generateAudioStream(
205-
client: AzureOpenAI,
206-
params: SpeechCreateParams
207-
): Promise<NodeJS.ReadableStream> {
192+
client,
193+
params
194+
) {
208195
const response = await client.audio.speech.create(params);
209196
if (response.ok) return response.body;
210197
throw new Error(`Failed to generate audio stream: ${response.statusText}`);
@@ -229,19 +216,12 @@ Your app's _package.json_ file will be updated with the dependencies.
229216
});
230217
231218
```
232-
233-
The import of `"openai/shims/node"` is necessary when running the code in a Node.js environment. It ensures that the output type of the `client.audio.speech.create` method is correctly set to `NodeJS.ReadableStream`.
234-
235-
1. Build the application with the following command:
236-
237-
```console
238-
tsc
239-
```
240219

241-
1. Run the application with the following command:
220+
1. Run the script with the following command:
242221

243222
```console
244223
node Text-to-speech.js
245224
```
225+
246226

247227
---

0 commit comments

Comments
 (0)