Skip to content

Commit 3acb424

Browse files
committed
2 parents 67b7753 + c8cb057 commit 3acb424

File tree

262 files changed

+2892
-1243
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

262 files changed

+2892
-1243
lines changed

articles/ai-services/computer-vision/includes/quickstarts-sdk/identity-python-sdk.md

Lines changed: 24 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ ms.author: pafarley
1515

1616
Get started with facial recognition using the Face client library for Python. Follow these steps to install the package and try out the example code for basic tasks. The Face service provides you with access to advanced algorithms for detecting and recognizing human faces in images. Follow these steps to install the package and try out the example code for basic face identification using remote images.
1717

18-
[Reference documentation](/python/api/overview/azure/cognitiveservices/face-readme) | [Library source code](https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/cognitiveservices/azure-cognitiveservices-vision-face) | [Package (PiPy)](https://pypi.org/project/azure-cognitiveservices-vision-face/) | [Samples](/samples/browse/?products=azure&term=face)
18+
[Reference documentation](/python/api/azure-ai-vision-face/azure.ai.vision.face) | [Library source code](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/face/azure-ai-vision-face/azure/ai/vision/face) | [Package (PiPy)](https://aka.ms/azsdk-python-face-pkg) | [Samples](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/face/azure-ai-vision-face/samples)
1919

2020
## Prerequisites
2121

2222
* Azure subscription - [Create one for free](https://azure.microsoft.com/free/cognitive-services/)
23-
* [Python 3.x](https://www.python.org/)
23+
* [Python 3.8+](https://www.python.org/)
2424
* Your Python installation should include [pip](https://pip.pypa.io/en/stable/). You can check if you have pip installed by running `pip --version` on the command line. Get pip by installing the latest version of Python.
2525
* [!INCLUDE [contributor-requirement](../../../includes/quickstarts/contributor-requirement.md)]
2626
* Once you have your Azure subscription, <a href="https://portal.azure.com/#create/Microsoft.CognitiveServicesFace" title="Create a Face resource" target="_blank">create a Face resource</a> in the Azure portal to get your key and endpoint. After it deploys, select **Go to resource**.
@@ -38,7 +38,7 @@ Get started with facial recognition using the Face client library for Python. Fo
3838
After installing Python, you can install the client library with:
3939

4040
```console
41-
pip install --upgrade azure-cognitiveservices-vision-face
41+
python -m pip install azure-ai-vision-face
4242
```
4343

4444
1. Create a new Python application
@@ -65,25 +65,28 @@ Get started with facial recognition using the Face client library for Python. Fo
6565
## Output
6666

6767
```console
68-
Person group: c8e679eb-0b71-43b4-aa91-ab8200cae7df
69-
face 861d769b-d014-40e8-8b4a-7fd3bc9b425b added to person f80c1cfa-b8cb-46f8-9f7f-e72fbe402bc3
70-
face e3c356a4-1ac3-4c97-9219-14648997f195 added to person f80c1cfa-b8cb-46f8-9f7f-e72fbe402bc3
71-
face f9119820-c374-4c4d-b795-96ae2fec5069 added to person be4084a7-0c7b-4cf9-9463-3756d2e28e17
72-
face 67d626df-3f75-4801-9364-601b63c8296a added to person be4084a7-0c7b-4cf9-9463-3756d2e28e17
73-
face 19e2e8cc-5029-4087-bca0-9f94588fb850 added to person 3ff07c65-6193-4d3e-bf18-d7c106393cd5
74-
face dcc61e80-16b1-4241-ae3f-9721597bae4c added to person 3ff07c65-6193-4d3e-bf18-d7c106393cd5
75-
pg resource is c8e679eb-0b71-43b4-aa91-ab8200cae7df
76-
<msrest.pipeline.ClientRawResponse object at 0x00000240DAD47310>
77-
Training status: running.
78-
79-
Training status: succeeded.
80-
68+
Person group: dbd92bf0-8b74-43fc-a27a-b127c1bb1b66
69+
face 1d09b50e-0fb6-430c-a47c-9bb235761c17 added to person ea92a5d5-5250-44db-88fb-3b32e1a1ecaf
70+
face 74e1807a-6c86-4c74-b497-a3bcdda8c631 added to person ea92a5d5-5250-44db-88fb-3b32e1a1ecaf
71+
face 512cc8ff-e18a-4702-9413-3c83af9a0915 added to person f03219b3-c2dc-4ad6-b00b-bd71792686ac
72+
face 899bbe8e-2d03-4941-8221-d087911df21b added to person f03219b3-c2dc-4ad6-b00b-bd71792686ac
73+
face dfc0d142-36b0-4d90-982b-b51570ead5a8 added to person 8697d263-be7b-4d78-ba40-b55305dbbeb6
74+
face 29939a66-9da2-46f2-b572-abbe4e0d754a added to person 8697d263-be7b-4d78-ba40-b55305dbbeb6
75+
Train the person group dbd92bf0-8b74-43fc-a27a-b127c1bb1b66
76+
The person group dbd92bf0-8b74-43fc-a27a-b127c1bb1b66 is trained successfully.
8177
Pausing for 10 seconds to avoid triggering rate limit on free account...
8278
Identifying faces in image
83-
Person for face ID 40582995-d3a8-41c4-a9d1-d17ae6b46c5c is identified in image, with a confidence of 0.96725.
84-
Person for face ID 7a0368a2-332c-4e7a-81c4-2db3d74c78c5 is identified in image, with a confidence of 0.96921.
85-
No person identified for face ID c4a3dd28-ef2d-457e-81d1-a447344242c4 in image.
86-
Person for face ID 360edf1a-1e8f-402d-aa96-1734d0c21c1c is identified in image, with a confidence of 0.92886.
79+
Person is identified for face ID 5779a986-238c-499d-b22a-d2a7cec92e88 in image, with a confidence of 0.96725.
80+
verification result: True. confidence: 0.96725
81+
Person is identified for face ID a28a4997-600e-4595-be39-d7a7d0f8afc8 in image, with a confidence of 0.96921.
82+
verification result: True. confidence: 0.96921
83+
No person identified for face ID 02a56d35-f3a4-43eb-a295-f23a1b772de9 in image.
84+
Person is identified for face ID 5de2019a-c4d3-4021-b8d0-9a3b86adceb7 in image, with a confidence of 0.92886.
85+
verification result: True. confidence: 0.92886
86+
87+
The person group dbd92bf0-8b74-43fc-a27a-b127c1bb1b66 is deleted.
88+
89+
End of quickstart.
8790
```
8891

8992

@@ -95,10 +98,6 @@ If you want to clean up and remove an Azure AI services subscription, you can de
9598
* [Portal](../../../multi-service-resource.md?pivots=azportal#clean-up-resources)
9699
* [Azure CLI](../../../multi-service-resource.md?pivots=azcli#clean-up-resources)
97100

98-
To delete the **PersonGroup** you created in this quickstart, run the following code in your script:
99-
100-
[!code-python[](~/cognitive-services-quickstart-code/python/Face/FaceQuickstart.py?name=snippet_deletegroup)]
101-
102101
## Next steps
103102

104103
In this quickstart, you learned how to use the Face client library for Python to do basic face identification. Next, learn about the different face detection models and how to specify the right model for your use case.
@@ -107,4 +106,4 @@ In this quickstart, you learned how to use the Face client library for Python to
107106
> [Specify a face detection model version](../../how-to/specify-detection-model.md)
108107
109108
* [What is the Face service?](../../overview-identity.md)
110-
* More extensive sample code can be found on [GitHub](https://github.com/Azure-Samples/cognitive-services-quickstart-code/blob/master/python/Face/FaceQuickstart.py).
109+
* More extensive sample code can be found on [GitHub](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/face/azure-ai-vision-face/samples).

articles/ai-services/content-safety/includes/openai-account-access.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ ms.author: pafarley
1313
1. Enable Managed Identity for Azure AI Content Safety.
1414

1515
Navigate to your Azure AI Content Safety instance in the Azure portal. Find the **Identity** section under the **Settings** category. Enable the system-assigned managed identity. This action grants your Azure AI Content Safety instance an identity that can be recognized and used within Azure for accessing other resources.
16-
16+
1717
:::image type="content" source="/azure/ai-services/content-safety/media/content-safety-identity.png" alt-text="Screenshot of a Content Safety identity resource in the Azure portal." lightbox="/azure/ai-services/content-safety/media/content-safety-identity.png":::
1818

19-
1. Assign Role to Managed Identity.
19+
1. Assign role to Managed Identity.
2020

2121
Navigate to your Azure OpenAI instance, select **Add role assignment** to start the process of assigning an Azure OpenAI role to the Azure AI Content Safety identity.
2222

articles/ai-services/document-intelligence/concept-model-overview.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ ms.author: lajanuar
4545

4646
The following table shows the available models for each current preview and stable API:
4747

48-
|**Model Type**| **Model**|&bullet; [2024-02-29-preview](/rest/api/aiservices/document-models/build-model?view=rest-aiservices-2024-02-29-preview&preserve-view=true&branch=docintelligence&tabs=HTTP) <br> &bullet [2023-10-31-preview](/rest/api/aiservices/operation-groups?view=rest-aiservices-2024-02-29-preview&preserve-view=true)|[2023-07-31 (GA)](/rest/api/aiservices/document-models/analyze-document?view=rest-aiservices-2023-07-31&preserve-view=true&tabs=HTTP)|[2022-08-31 (GA)](https://westus.dev.cognitive.microsoft.com/docs/services/form-recognizer-api-2022-08-31/operations/AnalyzeDocument)|[v2.1 (GA)](https://westus.dev.cognitive.microsoft.com/docs/services/form-recognizer-api-v2-1/operations/AnalyzeBusinessCardAsync)|
48+
|**Model Type**| **Model**|&bullet; [2024-02-29-preview](/rest/api/aiservices/document-models/build-model?view=rest-aiservices-2024-02-29-preview&preserve-view=true&branch=docintelligence&tabs=HTTP) <br> &bullet; [2023-10-31-preview](/rest/api/aiservices/operation-groups?view=rest-aiservices-2024-02-29-preview&preserve-view=true)|[2023-07-31 (GA)](/rest/api/aiservices/document-models/analyze-document?view=rest-aiservices-2023-07-31&preserve-view=true&tabs=HTTP)|[2022-08-31 (GA)](https://westus.dev.cognitive.microsoft.com/docs/services/form-recognizer-api-2022-08-31/operations/AnalyzeDocument)|[v2.1 (GA)](https://westus.dev.cognitive.microsoft.com/docs/services/form-recognizer-api-v2-1/operations/AnalyzeBusinessCardAsync)|
4949
|----------------|-----------|---|--|---|---|
5050
|Document analysis models|[Read](concept-read.md) | ✔️| ✔️| ✔️| n/a|
5151
|Document analysis models|[Layout](concept-layout.md) | ✔️| ✔️| ✔️| ✔️|

articles/ai-services/openai/assistants-quickstart.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ ms.custom: devx-track-python, devx-track-dotnet
88
ms.topic: quickstart
99
author: mrbullwinkle
1010
ms.author: mbullwin
11-
ms.date: 03/13/2024
11+
ms.date: 05/20/2024
1212
zone_pivot_groups: openai-quickstart-assistants
1313
recommendations: false
1414
---

articles/ai-services/openai/assistants-reference-messages.md

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ This article provides reference documentation for Python and REST for the new As
2121
## Create message
2222

2323
```http
24-
POST https://YOUR_RESOURCE_NAME.openai.azure.com/openai/threads/{thread_id}/messages?api-version=2024-02-15-preview
24+
POST https://YOUR_RESOURCE_NAME.openai.azure.com/openai/threads/{thread_id}/messages?api-version=2024-05-01-preview
2525
```
2626

2727
Create a message.
@@ -36,7 +36,7 @@ Create a message.
3636

3737
|Name | Type | Required | Description |
3838
|--- |--- |--- |--- |
39-
| `role` | string | Required | The role of the entity that is creating the message. Currently only user is supported.|
39+
| `role` | string | Required | The role of the entity that is creating the message. Can be `user` or `assistant`. `assistant` indicates the message is sent by an actual user and should be used in most cases to represent user-generated messages. `assistant` indicates the message is generated by the assistant. Use this value to insert messages from the assistant into the conversation. |
4040
| `content` | string | Required | The content of the message. |
4141
| `file_ids` | array | Optional | A list of File IDs that the message should use. There can be a maximum of 10 files attached to a message. Useful for tools like retrieval and code_interpreter that can access and use files. |
4242
| `metadata` | map | Optional | Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maximum of 512 characters long. |
@@ -54,7 +54,7 @@ from openai import AzureOpenAI
5454

5555
client = AzureOpenAI(
5656
api_key=os.getenv("AZURE_OPENAI_API_KEY"),
57-
api_version="2024-02-15-preview",
57+
api_version="2024-05-01-preview",
5858
azure_endpoint = os.getenv("AZURE_OPENAI_ENDPOINT")
5959
)
6060

@@ -69,7 +69,7 @@ print(thread_message)
6969
# [REST](#tab/rest)
7070

7171
```console
72-
curl https://YOUR_RESOURCE_NAME.openai.azure.com/openai/threads/{thread_id}/messages?api-version=2024-02-15-preview \
72+
curl https://YOUR_RESOURCE_NAME.openai.azure.com/openai/threads/{thread_id}/messages?api-version=2024-05-01-preview \
7373
-H "api-key: $AZURE_OPENAI_API_KEY" \
7474
-H 'Content-Type: application/json' \
7575
-d '{
@@ -83,7 +83,7 @@ curl https://YOUR_RESOURCE_NAME.openai.azure.com/openai/threads/{thread_id}/mess
8383
## List messages
8484

8585
```http
86-
GET https://YOUR_RESOURCE_NAME.openai.azure.com/openai/threads/{thread_id}/messages?api-version=2024-02-15-preview
86+
GET https://YOUR_RESOURCE_NAME.openai.azure.com/openai/threads/{thread_id}/messages?api-version=2024-05-01-preview
8787
```
8888

8989
Returns a list of messages for a given thread.
@@ -117,7 +117,7 @@ from openai import AzureOpenAI
117117

118118
client = AzureOpenAI(
119119
api_key=os.getenv("AZURE_OPENAI_API_KEY"),
120-
api_version="2024-02-15-preview",
120+
api_version="2024-05-01-preview",
121121
azure_endpoint = os.getenv("AZURE_OPENAI_ENDPOINT")
122122
)
123123

@@ -129,7 +129,7 @@ print(thread_messages.data)
129129
# [REST](#tab/rest)
130130

131131
```console
132-
curl https://YOUR_RESOURCE_NAME.openai.azure.com/openai/threads/{thread_id}/messages?api-version=2024-02-15-preview \
132+
curl https://YOUR_RESOURCE_NAME.openai.azure.com/openai/threads/{thread_id}/messages?api-version=2024-05-01-preview \
133133
-H "api-key: $AZURE_OPENAI_API_KEY" \
134134
-H 'Content-Type: application/json'
135135
```
@@ -139,15 +139,15 @@ curl https://YOUR_RESOURCE_NAME.openai.azure.com/openai/threads/{thread_id}/mess
139139
## List message files
140140

141141
```http
142-
GET https://YOUR_RESOURCE_NAME.openai.azure.com/openai/threads/{thread_id}/messages/{message_id}/files?api-version=2024-02-15-preview
142+
GET https://YOUR_RESOURCE_NAME.openai.azure.com/openai/threads/{thread_id}/messages/{message_id}/files?api-version=2024-05-01-preview
143143
```
144144

145145
Returns a list of message files.
146146

147147
|Parameter| Type | Required | Description |
148148
|---|---|---|---|
149149
|`thread_id` | string | Required | The ID of the thread that the message and files belong to. |
150-
|`message_id`| string | Required | The ID of the message that the files belongs to. |
150+
|`message_id`| string | Required | The ID of the message that the files belong to. |
151151

152152
**Query Parameters**
153153

@@ -171,7 +171,7 @@ from openai import AzureOpenAI
171171

172172
client = AzureOpenAI(
173173
api_key=os.getenv("AZURE_OPENAI_API_KEY"),
174-
api_version="2024-02-15-preview",
174+
api_version="2024-05-01-preview",
175175
azure_endpoint = os.getenv("AZURE_OPENAI_ENDPOINT")
176176
)
177177

@@ -186,7 +186,7 @@ print(message_files)
186186
# [REST](#tab/rest)
187187

188188
```console
189-
curl https://YOUR_RESOURCE_NAME.openai.azure.com/openai/threads/{thread_id}/messages/files?api-version=2024-02-15-preview \
189+
curl https://YOUR_RESOURCE_NAME.openai.azure.com/openai/threads/{thread_id}/messages/files?api-version=2024-05-01-preview \
190190
-H "api-key: $AZURE_OPENAI_API_KEY" \
191191
-H 'Content-Type: application/json'
192192
```
@@ -196,7 +196,7 @@ curl https://YOUR_RESOURCE_NAME.openai.azure.com/openai/threads/{thread_id}/mess
196196
## Retrieve message
197197

198198
```http
199-
GET https://YOUR_RESOURCE_NAME.openai.azure.com/openai/threads/{thread_id}/messages/{message_id}?api-version=2024-02-15-preview
199+
GET https://YOUR_RESOURCE_NAME.openai.azure.com/openai/threads/{thread_id}/messages/{message_id}?api-version=2024-05-01-preview
200200
```
201201

202202
Retrieves a message file.
@@ -222,7 +222,7 @@ from openai import AzureOpenAI
222222

223223
client = AzureOpenAI(
224224
api_key=os.getenv("AZURE_OPENAI_API_KEY"),
225-
api_version="2024-02-15-preview",
225+
api_version="2024-05-01-preview",
226226
azure_endpoint = os.getenv("AZURE_OPENAI_ENDPOINT")
227227
)
228228

@@ -237,7 +237,7 @@ print(message)
237237
# [REST](#tab/rest)
238238

239239
```console
240-
curl https://YOUR_RESOURCE_NAME.openai.azure.com/openai/threads/{thread_id}/messages/{message_id}?api-version=2024-02-15-preview \
240+
curl https://YOUR_RESOURCE_NAME.openai.azure.com/openai/threads/{thread_id}/messages/{message_id}?api-version=2024-05-01-preview \
241241
-H "api-key: $AZURE_OPENAI_API_KEY" \
242242
-H 'Content-Type: application/json'
243243
```
@@ -247,7 +247,7 @@ curl https://YOUR_RESOURCE_NAME.openai.azure.com/openai/threads/{thread_id}/mess
247247
## Retrieve message file
248248

249249
```http
250-
GET https://YOUR_RESOURCE_NAME.openai.azure.com/openai/threads/{thread_id}/messages/{message_id}/files/{file_id}?api-version=2024-02-15-preview
250+
GET https://YOUR_RESOURCE_NAME.openai.azure.com/openai/threads/{thread_id}/messages/{message_id}/files/{file_id}?api-version=2024-05-01-preview
251251
```
252252

253253
Retrieves a message file.
@@ -273,7 +273,7 @@ from openai import AzureOpenAI
273273

274274
client = AzureOpenAI(
275275
api_key=os.getenv("AZURE_OPENAI_API_KEY"),
276-
api_version="2024-02-15-preview",
276+
api_version="2024-05-01-preview",
277277
azure_endpoint = os.getenv("AZURE_OPENAI_ENDPOINT")
278278
)
279279

@@ -288,7 +288,7 @@ print(message_files)
288288
# [REST](#tab/rest)
289289

290290
```console
291-
curl https://YOUR_RESOURCE_NAME.openai.azure.com/openai/threads/{thread_id}/messages/{message_id}/files/{file_id}?api-version=2024-02-15-preview
291+
curl https://YOUR_RESOURCE_NAME.openai.azure.com/openai/threads/{thread_id}/messages/{message_id}/files/{file_id}?api-version=2024-05-01-preview
292292
``` \
293293
-H "api-key: $AZURE_OPENAI_API_KEY" \
294294
-H 'Content-Type: application/json'
@@ -299,7 +299,7 @@ curl https://YOUR_RESOURCE_NAME.openai.azure.com/openai/threads/{thread_id}/mess
299299
## Modify message
300300

301301
```http
302-
POST https://YOUR_RESOURCE_NAME.openai.azure.com/openai/threads/{thread_id}/messages/{message_id}?api-version=2024-02-15-preview
302+
POST https://YOUR_RESOURCE_NAME.openai.azure.com/openai/threads/{thread_id}/messages/{message_id}?api-version=2024-05-01-preview
303303
```
304304

305305
Modifies a message.
@@ -328,7 +328,7 @@ from openai import AzureOpenAI
328328

329329
client = AzureOpenAI(
330330
api_key=os.getenv("AZURE_OPENAI_API_KEY"),
331-
api_version="2024-02-15-preview",
331+
api_version="2024-05-01-preview",
332332
azure_endpoint = os.getenv("AZURE_OPENAI_ENDPOINT")
333333
)
334334

@@ -346,7 +346,7 @@ print(message)
346346
# [REST](#tab/rest)
347347

348348
```console
349-
curl https://YOUR_RESOURCE_NAME.openai.azure.com/openai/threads/{thread_id}/messages/{message_id}?api-version=2024-02-15-preview
349+
curl https://YOUR_RESOURCE_NAME.openai.azure.com/openai/threads/{thread_id}/messages/{message_id}?api-version=2024-05-01-preview
350350
``` \
351351
-H "api-key: $AZURE_OPENAI_API_KEY" \
352352
-H 'Content-Type: application/json' \

0 commit comments

Comments
 (0)