Skip to content

Commit a591f1d

Browse files
Merge pull request #1364 from minhanh-phan/openai/migration-update
[OpenAI] Update Migration Guide
2 parents 1514d45 + e41f0b1 commit a591f1d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

articles/ai-services/openai/how-to/migration-javascript.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,14 @@ const azureADTokenProvider = getBearerTokenProvider(credential, scope);
4343

4444
### (Highly Discouraged) API Key
4545

46-
API keys are not recommended for production use because they are less secure than other authentication methods. However, if you are using an API key to authenticate `OpenAIClient` or `AssistantsClient`, an `AzureKeyCredential` object must be created as follows:
46+
API keys are not recommended for production use because they are less secure than other authentication methods. Previously, `AzureKeyCredential` objects were created as follows to authenticate `OpenAIClient` or `AssistantsClient`:
4747

4848
```typescript
4949
import { AzureKeyCredential } from "@azure/openai";
5050
const apiKey = new AzureKeyCredential("your API key");
5151
```
5252

53-
Authenticating `AzureOpenAI` with an API key involves setting the `AZURE_OPENAI_API_KEY` environment variable or setting the `apiKey` string property in the options object when creating the `AzureOpenAI` client.
53+
On the other hand, `AzureOpenAI` can be authenticated with an API key by setting the `AZURE_OPENAI_API_KEY` environment variable or by setting the `apiKey` string property in the options object when creating the `AzureOpenAI` client.
5454

5555
[!INCLUDE [Azure key vault](~/reusable-content/ce-skilling/azure/includes/ai-services/security/azure-key-vault.md)]
5656

0 commit comments

Comments
 (0)