From ab022541b23602bdbd9c439dd19a1a0938af35a8 Mon Sep 17 00:00:00 2001 From: Maggie Johnson-Pint Date: Wed, 5 Oct 2022 15:44:37 -0700 Subject: [PATCH] add missing results iterator Looks like this line of code got dropped from the sample somewhere along the way. --- docs-ref-services/preview/ai-text-analytics-readme.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs-ref-services/preview/ai-text-analytics-readme.md b/docs-ref-services/preview/ai-text-analytics-readme.md index 6cddbc3363f0..7e19e346bc09 100644 --- a/docs-ref-services/preview/ai-text-analytics-readme.md +++ b/docs-ref-services/preview/ai-text-analytics-readme.md @@ -532,6 +532,8 @@ async function main() { }, ]; const poller = await client.beginAnalyzeBatch(actions, documents, "en"); + const results = await poller.pollUntilDone(); + for await (const actionResult of results) { if (actionResult.kind !== "CustomEntityRecognition") { throw new Error(`Expected a CustomEntityRecognition results but got: ${actionResult.kind}`);