Skip to content

Commit 45dabf1

Browse files
authored
Update javascript-sdk.md
1 parent 868b66f commit 45dabf1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

articles/ai-services/document-intelligence/quickstarts/includes/javascript-sdk.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ Extract text, selection marks, text styles, table structures, and bounding regio
146146
:::moniker range="doc-intel-4.0.0"
147147

148148
```javascript
149-
const { AzureKeyCredential, DocumentAnalysisClient } = require("@azure-rest/ai-document-intelligence");
149+
const { AzureKeyCredential, DocumentIntelligenceClient } = require("@azure-rest/ai-document-intelligence");
150150

151151
// set `<your-key>` and `<your-endpoint>` variables with the values from the Azure portal.
152152
const key = "<your-key>";
@@ -156,7 +156,7 @@ Extract text, selection marks, text styles, table structures, and bounding regio
156156
const formUrl = "https://raw.githubusercontent.com/Azure-Samples/cognitive-services-REST-api-samples/master/curl/form-recognizer/sample-layout.pdf"
157157

158158
async function main() {
159-
const client = DocumentAnalysisClient(endpoint, new AzureKeyCredential(key));
159+
const client = DocumentIntelligenceClient(endpoint, new AzureKeyCredential(key));
160160

161161
const poller = await client.beginAnalyzeDocument("prebuilt-layout", formUrl);
162162

@@ -311,7 +311,7 @@ In this example, we analyze an invoice using the **prebuilt-invoice** model.
311311

312312
```javascript
313313

314-
const { AzureKeyCredential, DocumentAnalysisClient } = require("@azure-rest/ai-document-intelligence");
314+
const { AzureKeyCredential, DocumentIntelligenceClient } = require("@azure-rest/ai-document-intelligence");
315315

316316
// set `<your-key>` and `<your-endpoint>` variables with the values from the Azure portal.
317317
const key = "<your-key>";
@@ -321,7 +321,7 @@ const { AzureKeyCredential, DocumentAnalysisClient } = require("@azure-rest/ai-d
321321
invoiceUrl = "https://raw.githubusercontent.com/Azure-Samples/cognitive-services-REST-api-samples/master/curl/form-recognizer/sample-invoice.pdf"
322322

323323
async function main() {
324-
const client = DocumentAnalysisClient(endpoint, new AzureKeyCredential(key));
324+
const client = DocumentIntelligenceClient(endpoint, new AzureKeyCredential(key));
325325

326326
const poller = await client.beginAnalyzeDocument("prebuilt-invoice", invoiceUrl);
327327
if (pages.length <= 0) {

0 commit comments

Comments
 (0)