diff --git a/docs-ref-services/preview/ai-text-analytics-readme.md b/docs-ref-services/preview/ai-text-analytics-readme.md index 6cddbc3363f..7e19e346bc0 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}`);