File tree Expand file tree Collapse file tree 1 file changed +18
-4
lines changed
articles/ai-foundry/model-inference/includes Expand file tree Collapse file tree 1 file changed +18
-4
lines changed Original file line number Diff line number Diff line change @@ -12,21 +12,35 @@ author: santiagxf
1212 ``` bash
1313 npm install @azure-rest/ai-inference
1414 npm install @azure/core-auth
15+ npm install @azure/identity
1516 ```
1617
17- Alternately , you can add your dependencies to ** package.json** and install with ` npm rebuild ` :
18+ If you are using Node.js , you can configure the dependencies in a ** package.json** file :
1819
1920 __ package.json__
2021
2122 ``` json
2223 {
23- "name" : " sample_app " ,
24+ "name" : " main_app " ,
2425 "version" : " 1.0.0" ,
2526 "description" : " " ,
2627 "main" : " app.js" ,
28+ "type" : " module" ,
2729 "dependencies" : {
2830 "@azure-rest/ai-inference" : " 1.0.0-beta.6" ,
29- "@azure/core-auth" : " 1.9.0"
31+ "@azure/core-auth" : " 1.9.0" ,
32+ "@azure/core-sse" : " 2.2.0" ,
33+ "@azure/identity" : " 4.8.0"
3034 }
3135 }
32- ```
36+ ```
37+
38+ * Import the following:
39+
40+ ``` javascript
41+ import ModelClient from " @azure-rest/ai-inference" ;
42+ import { isUnexpected } from " @azure-rest/ai-inference" ;
43+ import { createSseStream } from " @azure/core-sse" ;
44+ import { AzureKeyCredential } from " @azure/core-auth" ;
45+ import { DefaultAzureCredential } from " @azure/identity" ;
46+ ```
You can’t perform that action at this time.
0 commit comments