You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/ai-services/openai/includes/language-overview/javascript.md
+29-37Lines changed: 29 additions & 37 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,18 +25,6 @@ Feature availability in Azure OpenAI is dependent on what version of the REST AP
25
25
npm install openai
26
26
```
27
27
28
-
## Configuration
29
-
30
-
The `AzureClientOptions` object is used to configure the API client for interfacing with the Azure OpenAI API. The configuration object extends the existing OpenAi `ClientOptions` object. Below are the Azure OpenAI specific properties, their default values, and descriptions:
31
-
32
-
| Property | Details |
33
-
|--|--|
34
-
| azureADTokenProvider: `(() => Promise<string>)`| A function that returns an access token for Microsoft Entra (formerly known as Azure Active Directory), invoked on every request.|
35
-
| apiKey: `string`| Your API key for authenticating requests. Default environment variable is `AZURE_OPENAI_API_KEY`.|
36
-
| apiVersion: `string`| Specifies the API version to use. Default environment variable is `OPENAI_API_VERSION`|
37
-
| deployment: `string`| A model deployment. If provided, sets the base client URL to include `/deployments/{deployment}`. Non-deployment endpoints cannot be used (not supported with Assistants APIs).|
38
-
| endpoint: `string`| Your Azure OpenAI endpoint.|
The `AzureClientOptions` object extends the OpenAI `ClientOptions` object. This Azure-specific client object is used to configure the connection and behavior of the Azure OpenAI client. It includes properties for specifying the properties unique to Azure.
64
+
65
+
| Property | Details |
66
+
|--|--|
67
+
| apiVersion: `string`| Specifies the API version to use. |
68
+
| azureADTokenProvider: `(() => Promise<string>)`| A function that returns an access token for Microsoft Entra (formerly known as Azure Active Directory), invoked on every request.|
69
+
| deployment: `string`| A model deployment. If provided, sets the base client URL to include `/deployments/{deployment}`. Non-deployment endpoints cannot be used (not supported with Assistants APIs).|
70
+
| endpoint: `string`| Your Azure OpenAI endpoint with the following format: `https://RESOURCE-NAME.azure.openai.com/`.|
71
+
71
72
# [API Key](#tab/api-key)
72
73
73
74
API keys are not recommended for production use because they are less secure than other authentication methods.
@@ -77,38 +78,29 @@ import { AzureKeyCredential } from "@azure/openai";
77
78
const apiKey =newAzureKeyCredential("your API key");
`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 [`AzureClientOptions`](#configuration) object when creating the `AzureOpenAI` client.
91
+
The `AzureClientOptions` object extends the OpenAI `ClientOptions` object. This Azure-specific client object is used to configure the connection and behavior of the Azure OpenAI client. It includes properties for specifying the properties unique to Azure.
92
+
93
+
| Property | Details |
94
+
|--|--|
95
+
| apiKey: `string`| Your API key for authenticating requests. |
96
+
| apiVersion: `string`| Specifies the API version to use. |
97
+
| deployment: `string`| A model deployment. If provided, sets the base client URL to include `/deployments/{deployment}`. Non-deployment endpoints cannot be used (not supported with Assistants APIs).|
98
+
| endpoint: `string`| Your Azure OpenAI endpoint with the following format: `https://RESOURCE-NAME.azure.openai.com/`.|
The `AzureClientOptions` object is used to configure the connection and behavior of the Azure Cosmos DB client. It includes properties for specifying the endpoint, authentication credentials, database and container names, consistency level, connection policy, and request timeout.
0 commit comments