Skip to content

Commit b7dc2d2

Browse files
committed
update
1 parent e1a717d commit b7dc2d2

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

articles/ai-foundry/openai/how-to/fine-tune-test.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: Learn how to test your fine-tuned model with Azure OpenAI in Azure
55
author: voutilad
66
ms.author: davevoutila
77
manager: nitinme
8-
ms.date: 05/20/2025
8+
ms.date: 09/30/2025
99
ms.service: azure-ai-foundry
1010
ms.subservice: azure-ai-foundry-openai
1111
ms.topic: how-to
@@ -49,7 +49,7 @@ resource_group = "<YOUR_RESOURCE_GROUP_NAME>"
4949
resource_name = "<YOUR_AZURE_OPENAI_RESOURCE_NAME>"
5050
model_deployment_name = "gpt41-mini-candidate-01" # custom deployment name that you will use to reference the model when making inference calls.
5151

52-
deploy_params = {'api-version': "2025-04-01-preview"}
52+
deploy_params = {'api-version': "2025-07-01-preview"}
5353
deploy_headers = {'Authorization': 'Bearer {}'.format(token), 'Content-Type': 'application/json'}
5454

5555
deploy_data = {
@@ -91,7 +91,7 @@ The following example shows how to use the REST API to create a model deployment
9191

9292

9393
```bash
94-
curl -X POST "https://management.azure.com/subscriptions/<SUBSCRIPTION>/resourceGroups/<RESOURCE_GROUP>/providers/Microsoft.CognitiveServices/accounts/<RESOURCE_NAME>/deployments/<MODEL_DEPLOYMENT_NAME>?api-version=2025-04-01-preview" \
94+
curl -X POST "https://management.azure.com/subscriptions/<SUBSCRIPTION>/resourceGroups/<RESOURCE_GROUP>/providers/Microsoft.CognitiveServices/accounts/<RESOURCE_NAME>/deployments/<MODEL_DEPLOYMENT_NAME>?api-version=2025-07-01-preview" \
9595
-H "Authorization: Bearer <TOKEN>" \
9696
-H "Content-Type: application/json" \
9797
-d '{
@@ -157,12 +157,11 @@ You can also use the [Evaluations](./evaluations.md) service to create and run m
157157

158158
```python
159159
import os
160-
from openai import AzureOpenAI
160+
from openai import OpenAI
161161

162-
client = AzureOpenAI(
163-
azure_endpoint = os.getenv("AZURE_OPENAI_ENDPOINT"),
162+
client = OpenAI(
163+
base_url = "https://YOUR-RESOURCE-NAME.openai.azure.com/openai/v1/",
164164
api_key=os.getenv("AZURE_OPENAI_API_KEY"),
165-
api_version="2024-02-01"
166165
)
167166

168167
response = client.chat.completions.create(
@@ -181,11 +180,12 @@ print(response.choices[0].message.content)
181180
## [REST](#tab/rest)
182181

183182
```bash
184-
curl $AZURE_OPENAI_ENDPOINT/openai/deployments/<deployment_name>/chat/completions?api-version=2025-04-01-preview \
183+
curl $AZURE_OPENAI_ENDPOINT/openai/v1/chat/completions \
185184
-H "Content-Type: application/json" \
186185
-H "api-key: $AZURE_OPENAI_API_KEY" \
187-
-d '{"messages":[{"role": "system", "content": "You are a helpful assistant."},{"role": "user", "content": "Does Azure OpenAI support customer managed keys?"},{"role": "assistant", "content": "Yes, customer managed keys are supported by Azure OpenAI."},{"role": "user", "content": "Do other Azure AI services support this too?"}]}'
186+
-d '"model": "YOUR-MODEL-DEPLOYMENT_NAME", {"messages":[{"role": "system", "content": "You are a helpful assistant."},{"role": "user", "content": "Does Azure OpenAI support customer managed keys?"},{"role": "assistant", "content": "Yes, customer managed keys are supported by Azure OpenAI."},{"role": "user", "content": "Do other Azure AI services support this too?"}]}'
188187
```
188+
189189
---
190190

191191
## Clean up your deployment

0 commit comments

Comments
 (0)