Skip to content

Commit f209ebc

Browse files
committed
tabs all the way
1 parent aa97b48 commit f209ebc

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

articles/ai-services/openai/includes/javascript.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,10 @@ Your app's _package.json_ file will be updated with the dependencies.
6464

6565
Open a command prompt where you created the new project, and create a new file named Completion.js. Copy the following code into the Completion.js file.
6666

67+
## [**TypeScript**](#tab/typescript)
68+
69+
## [**JavaScript**](#tab/javascript)
70+
6771
```javascript
6872
const { AzureOpenAI } = require("openai");
6973

@@ -104,6 +108,8 @@ Run the script with the following command:
104108
node.exe Completion.js
105109
```
106110

111+
---
112+
107113
## Output
108114

109115
```output
@@ -117,6 +123,11 @@ Microsoft was founded on April 4, 1975.
117123
> [!IMPORTANT]
118124
> In the previous example we are demonstrating key-based authentication. Once you have tested with key-based authentication successfully, we recommend using the more secure [Microsoft Entra ID](/entra/fundamentals/whatis) for authentication which is demonstrated in the next code sample. Getting started with [Microsoft Entra ID] will require some additional [prerequisites](https://www.npmjs.com/package/@azure/identity).
119125
126+
## [**TypeScript**](#tab/typescript)
127+
128+
129+
## [**JavaScript**](#tab/javascript)
130+
120131
```javascript
121132
const { AzureOpenAI } = require("openai");
122133
const { DefaultAzureCredential, getBearerTokenProvider } = require("@azure/identity");

0 commit comments

Comments
 (0)