diff --git a/sdk/cognitivelanguage/ai-language-text/README.md b/sdk/cognitivelanguage/ai-language-text/README.md index e198e13276ca..6d2e2a7ce8bb 100644 --- a/sdk/cognitivelanguage/ai-language-text/README.md +++ b/sdk/cognitivelanguage/ai-language-text/README.md @@ -471,6 +471,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}`);