Skip to content

Commit

Permalink
need to declare results iterator in sample (Azure#23410)
Browse files Browse the repository at this point in the history
  • Loading branch information
maggiepint authored Oct 5, 2022
1 parent 15bfcd8 commit b16bb8e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions sdk/cognitivelanguage/ai-language-text/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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}`);
Expand Down

0 comments on commit b16bb8e

Please sign in to comment.