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/how-to/switching-endpoints.md
+8-5Lines changed: 8 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,7 +34,7 @@ We recommend using environment variables. If you haven't done this before our [P
34
34
from openai import OpenAI
35
35
36
36
client = OpenAI(
37
-
api_key=os.environ['OPENAI_API_KEY']
37
+
api_key=os.environ["OPENAI_API_KEY"]
38
38
)
39
39
40
40
@@ -74,7 +74,7 @@ client = AzureOpenAI(
74
74
from openai import OpenAI
75
75
76
76
client = OpenAI(
77
-
api_key=os.environ['OPENAI_API_KEY']
77
+
api_key=os.environ["OPENAI_API_KEY"]
78
78
)
79
79
80
80
@@ -111,7 +111,10 @@ client = AzureOpenAI(
111
111
112
112
## Keyword argument for model
113
113
114
-
OpenAI uses the `model` keyword argument to specify what model to use. Azure OpenAI has the concept of unique model [deployments](create-resource.md?pivots=web-portal#deploy-a-model). When using Azure OpenAI `model` should refer to the underling deployment name you chose when you deployed the model.
114
+
OpenAI uses the `model` keyword argument to specify what model to use. Azure OpenAI has the concept of unique model [deployments](create-resource.md?pivots=web-portal#deploy-a-model). When using Azure OpenAI `model` should refer to the underlying deployment name you chose when you deployed the model.
115
+
116
+
> [!IMPORTANT]
117
+
> When you access the model via the API in Azure OpenAI you will need to refer to the deployment name rather than the underlying model name in API calls. This is one of the [key differences](../how-to/switching-endpoints.md) between OpenAI and Azure OpenAI. OpenAI only requires the model name, Azure OpenAI always requires deployment name, even when using the model parameter. In our docs we often have examples where deployment names are represented as identical to model names to help indicate which model works with a particular API endpoint. Ultimately your deployment names can follow whatever naming convention is best for your use case.
115
118
116
119
<table>
117
120
<tr>
@@ -122,7 +125,7 @@ OpenAI uses the `model` keyword argument to specify what model to use. Azure Ope
Copy file name to clipboardExpand all lines: articles/ai-services/openai/includes/create-resource-cli.md
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -95,6 +95,9 @@ az cognitiveservices account deployment create \
95
95
--sku-name "Standard"
96
96
```
97
97
98
+
> [!IMPORTANT]
99
+
> When you access the model via the API you will need to refer to the deployment name rather than the underlying model name in API calls. This is one of the [key differences](../how-to/switching-endpoints.md) between OpenAI and Azure OpenAI. OpenAI only requires the model name, Azure OpenAI always requires deployment name, even when using the model parameter. In our docs we often have examples where deployment names are represented as identical to model names to help indicate which model works with a particular API endpoint. Ultimately your deployment names can follow whatever naming convention is best for your use case.
100
+
98
101
## Delete a model from your resource
99
102
100
103
You can delete any model deployed from your resource with the [az cognitiveservices account deployment delete](/cli/azure/cognitiveservices/account/deployment?view=azure-cli-latest&preserve-view=true#az-cognitiveservices-account-deployment-delete) command. In the following example, you delete a model named _MyModel_. When you try the example, update the code to use your values for the resource group, resource, and deployed model.
Copy file name to clipboardExpand all lines: articles/ai-services/openai/includes/create-resource-portal.md
+10-7Lines changed: 10 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -100,25 +100,28 @@ To deploy a model, follow these steps:
100
100
101
101
1. Sign in to [Azure OpenAI Studio](https://oai.azure.com).
102
102
103
-
1. Choose the subscription and the Azure OpenAI resource to work with, and select **Use resource**.
103
+
2. Choose the subscription and the Azure OpenAI resource to work with, and select **Use resource**.
104
104
105
-
1. Under **Management** select **Deployments**.
105
+
3. Under **Management** select **Deployments**.
106
106
107
-
1. Select **Create new deployment** and configure the following fields:
107
+
4. Select **Create new deployment** and configure the following fields:
108
108
109
109
| Field | Description |
110
110
|---|---|
111
111
|**Select a model**| Model availability varies by region. For a list of available models per region, see [Model summary table and region availability](../concepts/models.md#model-summary-table-and-region-availability). |
112
112
|**Deployment name**| Choose a name carefully. The deployment name is used in your code to call the model by using the client libraries and the REST APIs. |
113
113
|**Advanced options** (Optional) | You can set optional advanced settings, as needed for your resource. <br> - For the **Content Filter**, assign a content filter to your deployment.<br> - For the **Tokens per Minute Rate Limit**, adjust the Tokens per Minute (TPM) to set the effective rate limit for your deployment. You can modify this value at any time by using the [**Quotas**](../how-to/quota.md) menu. |
114
114
115
-
1. Select a model from the dropdown list.
115
+
5. Select a model from the dropdown list.
116
116
117
-
1. Enter a deployment name to help you identify the model.
117
+
6. Enter a deployment name to identify the model.
118
118
119
-
1. For your first deployment, leave the **Advanced options** set to the defaults.
119
+
> [!IMPORTANT]
120
+
> When you access the model via the API you will need to refer to the deployment name rather than the underlying model name in API calls. This is one of the [key differences](../how-to/switching-endpoints.md) between OpenAI and Azure OpenAI. OpenAI only requires the model name, Azure OpenAI always requires deployment name, even when using the model parameter. In our docs we often have examples where deployment names are represented as identical to model names to help indicate which model works with a particular API endpoint. Ultimately your deployment names can follow whatever naming convention is best for your use case.
120
121
121
-
1. Select **Create**.
122
+
7. For your first deployment, leave the **Advanced options** set to the defaults.
123
+
124
+
8. Select **Create**.
122
125
123
126
The deployments table shows a new entry that corresponds to your newly created model.
> When you access the model via the API you will need to refer to the deployment name rather than the underlying model name in API calls. This is one of the [key differences](../how-to/switching-endpoints.md) between OpenAI and Azure OpenAI. OpenAI only requires the model name, Azure OpenAI always requires deployment name, even when using the model parameter. In our docs we often have examples where deployment names are represented as identical to model names to help indicate which model works with a particular API endpoint. Ultimately your deployment names can follow whatever naming convention is best for your use case.
95
+
93
96
## Delete a model from your resource
94
97
95
98
You can delete any model deployed from your resource with the [Remove-AzCognitiveServicesAccountDeployment](/powershell/module/az.cognitiveservices/remove-azcognitiveservicesaccountdeployment) command. In the following example, you delete a model named _MyModel_. When you try the example, update the code to use your values for the resource group, resource, and deployed model.
0 commit comments