Skip to content

Commit d4d2374

Browse files
authored
Merge pull request #531 from MicrosoftDocs/main
9/27/2024 AM Publish
2 parents 04a3dea + cf2125b commit d4d2374

11 files changed

+360
-144
lines changed

articles/ai-services/cognitive-services-container-support.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ keywords: on-premises, Docker, container, Kubernetes
1515

1616
# What are Azure AI containers?
1717

18-
Azure AI services provides several [Docker containers](https://www.docker.com/what-container) that let you use the same APIs that are available in Azure, on-premises. Using these containers gives you the flexibility to bring Azure AI services closer to your data for compliance, security or other operational reasons. Container support is currently available for a subset of Azure AI services.
18+
Azure AI services provide several [Docker containers](https://www.docker.com/what-container) that let you use the same APIs that are available in Azure, on-premises. Using these containers gives you the flexibility to bring Azure AI services closer to your data for compliance, security or other operational reasons. Container support is currently available for a subset of Azure AI services.
1919

2020
> [!VIDEO https://www.youtube.com/embed/hdfbn4Q8jbo]
2121
@@ -48,7 +48,7 @@ Azure AI containers provide the following set of Docker containers, each of whic
4848
| Service | Container | Description | Availability |
4949
|--|--|--|--|
5050
| [LUIS][lu-containers] | **LUIS** ([image](https://mcr.microsoft.com/product/azure-cognitive-services/language/luis/about)) | Loads a trained or published Language Understanding model, also known as a LUIS app, into a docker container and provides access to the query predictions from the container's API endpoints. You can collect query logs from the container and upload these back to the [LUIS portal](https://www.luis.ai) to improve the app's prediction accuracy. | Generally available. <br> This container can also [run in disconnected environments](containers/disconnected-containers.md). |
51-
| [Language service][ta-containers-keyphrase] | **Key Phrase Extraction** ([image](https://mcr.microsoft.com/product/azure-cognitive-services/textanalytics/keyphrase/about)) | Extracts key phrases to identify the main points. For example, for the input text "The food was delicious and there were wonderful staff", the API returns the main talking points: "food" and "wonderful staff". | Generally available. <br> This container can also [run in disconnected environments](containers/disconnected-containers.md). |
51+
| [Language service][ta-containers-keyphrase] | **Key Phrase Extraction** ([image](https://mcr.microsoft.com/product/azure-cognitive-services/textanalytics/keyphrase/about)) | Extracts key phrases to identify the main points. For example, for the input text "The food was delicious and there were wonderful staff," the API returns the main talking points: "food" and "wonderful staff". | Generally available. <br> This container can also [run in disconnected environments](containers/disconnected-containers.md). |
5252
| [Language service][ta-containers-language] | **Text Language Detection** ([image](https://mcr.microsoft.com/product/azure-cognitive-services/textanalytics/language/about)) | For up to 120 languages, detects which language the input text is written in and report a single language code for every document submitted on the request. The language code is paired with a score indicating the strength of the score. | Generally available. <br> This container can also [run in disconnected environments](containers/disconnected-containers.md). |
5353
| [Language service][ta-containers-sentiment] | **Sentiment Analysis** ([image](https://mcr.microsoft.com/product/azure-cognitive-services/textanalytics/sentiment/about)) | Analyzes raw text for clues about positive or negative sentiment. This version of sentiment analysis returns sentiment labels (for example *positive* or *negative*) for each document and sentence within it. | Generally available. <br> This container can also [run in disconnected environments](containers/disconnected-containers.md). |
5454
| [Language service][ta-containers-health] | **Text Analytics for health** ([image](https://mcr.microsoft.com/product/azure-cognitive-services/textanalytics/healthcare/about))| Extract and label medical information from unstructured clinical text. | Generally available |

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

Lines changed: 17 additions & 16 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-05-01-preview
24+
POST https://YOUR_RESOURCE_NAME.openai.azure.com/openai/threads/{thread_id}/messages?api-version=2024-08-01-preview
2525
```
2626

2727
Create a message.
@@ -38,7 +38,7 @@ Create a message.
3838
|--- |--- |--- |--- |
3939
| `role` | string | Required | The role of the entity that is creating the message. Can be `user` or `assistant`. `user` 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. |
41-
| `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. |
41+
| `attachments` | array | Optional | A list of files attached to the message, and the tools they should be added to. |
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. |
4343

4444
### Returns
@@ -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-05-01-preview",
57+
api_version="2024-08-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-05-01-preview \
72+
curl https://YOUR_RESOURCE_NAME.openai.azure.com/openai/threads/{thread_id}/messages?api-version=2024-08-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-05-01-preview
86+
GET https://YOUR_RESOURCE_NAME.openai.azure.com/openai/threads/{thread_id}/messages?api-version=2024-08-01-preview
8787
```
8888

8989
Returns a list of messages for a given thread.
@@ -102,6 +102,7 @@ Returns a list of messages for a given thread.
102102
| `limit` | integer | Optional - Defaults to 20 |A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.|
103103
| `order` | string | Optional - Defaults to desc |Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order.|
104104
| `after` | string | Optional | A cursor for use in pagination. after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.|
105+
| `run_id` | string | Optionanl | Filter messages by the run ID that generated them. |
105106
| `before` | string | Optional | A cursor for use in pagination. before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list.|
106107

107108
### Returns
@@ -117,7 +118,7 @@ from openai import AzureOpenAI
117118

118119
client = AzureOpenAI(
119120
api_key=os.getenv("AZURE_OPENAI_API_KEY"),
120-
api_version="2024-05-01-preview",
121+
api_version="2024-08-01-preview",
121122
azure_endpoint = os.getenv("AZURE_OPENAI_ENDPOINT")
122123
)
123124

@@ -129,7 +130,7 @@ print(thread_messages.data)
129130
# [REST](#tab/rest)
130131

131132
```console
132-
curl https://YOUR_RESOURCE_NAME.openai.azure.com/openai/threads/{thread_id}/messages?api-version=2024-05-01-preview \
133+
curl https://YOUR_RESOURCE_NAME.openai.azure.com/openai/threads/{thread_id}/messages?api-version=2024-08-01-preview \
133134
-H "api-key: $AZURE_OPENAI_API_KEY" \
134135
-H 'Content-Type: application/json'
135136
```
@@ -139,7 +140,7 @@ curl https://YOUR_RESOURCE_NAME.openai.azure.com/openai/threads/{thread_id}/mess
139140
## Retrieve message
140141

141142
```http
142-
GET https://YOUR_RESOURCE_NAME.openai.azure.com/openai/threads/{thread_id}/messages/{message_id}?api-version=2024-05-01-preview
143+
GET https://YOUR_RESOURCE_NAME.openai.azure.com/openai/threads/{thread_id}/messages/{message_id}?api-version=2024-08-01-preview
143144
```
144145

145146
Retrieves a message file.
@@ -180,7 +181,7 @@ print(message)
180181
# [REST](#tab/rest)
181182

182183
```console
183-
curl https://YOUR_RESOURCE_NAME.openai.azure.com/openai/threads/{thread_id}/messages/{message_id}?api-version=2024-05-01-preview \
184+
curl https://YOUR_RESOURCE_NAME.openai.azure.com/openai/threads/{thread_id}/messages/{message_id}?api-version=2024-08-01-preview \
184185
-H "api-key: $AZURE_OPENAI_API_KEY" \
185186
-H 'Content-Type: application/json'
186187
```
@@ -190,7 +191,7 @@ curl https://YOUR_RESOURCE_NAME.openai.azure.com/openai/threads/{thread_id}/mess
190191
## Modify message
191192

192193
```http
193-
POST https://YOUR_RESOURCE_NAME.openai.azure.com/openai/threads/{thread_id}/messages/{message_id}?api-version=2024-05-01-preview
194+
POST https://YOUR_RESOURCE_NAME.openai.azure.com/openai/threads/{thread_id}/messages/{message_id}?api-version=2024-08-01-preview
194195
```
195196

196197
Modifies a message.
@@ -206,7 +207,7 @@ Modifies a message.
206207

207208
|Parameter| Type | Required | Description |
208209
|---|---|---|---|
209-
| 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.|
210+
| `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.|
210211

211212
### Returns
212213

@@ -219,7 +220,7 @@ from openai import AzureOpenAI
219220

220221
client = AzureOpenAI(
221222
api_key=os.getenv("AZURE_OPENAI_API_KEY"),
222-
api_version="2024-05-01-preview",
223+
api_version="2024-08-01-preview",
223224
azure_endpoint = os.getenv("AZURE_OPENAI_ENDPOINT")
224225
)
225226

@@ -237,7 +238,7 @@ print(message)
237238
# [REST](#tab/rest)
238239

239240
```console
240-
curl https://YOUR_RESOURCE_NAME.openai.azure.com/openai/threads/{thread_id}/messages/{message_id}?api-version=2024-05-01-preview
241+
curl https://YOUR_RESOURCE_NAME.openai.azure.com/openai/threads/{thread_id}/messages/{message_id}?api-version=2024-08-01-preview
241242
``` \
242243
-H "api-key: $AZURE_OPENAI_API_KEY" \
243244
-H 'Content-Type: application/json' \
@@ -256,7 +257,7 @@ curl https://YOUR_RESOURCE_NAME.openai.azure.com/openai/threads/{thread_id}/mess
256257

257258

258259
```http
259-
DELETE https://YOUR_RESOURCE_NAME.openai.azure.com/openai/threads/{thread_id}/messages/{message_id}?api-version=2024-05-01-preview
260+
DELETE https://YOUR_RESOURCE_NAME.openai.azure.com/openai/threads/{thread_id}/messages/{message_id}?api-version=2024-08-01-preview
260261
```
261262

262263
Deletes a message.
@@ -278,7 +279,7 @@ The deletion status of the [message](#message-object) object.
278279
from openai import AzureOpenAI
279280
client = AzureOpenAI(
280281
api_key=os.getenv("AZURE_OPENAI_API_KEY"),
281-
api_version="2024-05-01-preview",
282+
api_version="2024-08-01-preview",
282283
azure_endpoint = os.getenv("AZURE_OPENAI_ENDPOINT")
283284
)
284285

@@ -292,7 +293,7 @@ print(deleted_message)
292293
# [REST](#tab/rest)
293294

294295
```console
295-
curl -x DELETE https://YOUR_RESOURCE_NAME.openai.azure.com/openai/threads/{thread_id}/messages/{message_id}?api-version=2024-05-01-preview \
296+
curl -x DELETE https://YOUR_RESOURCE_NAME.openai.azure.com/openai/threads/{thread_id}/messages/{message_id}?api-version=2024-08-01-preview \
296297
-H "api-key: $AZURE_OPENAI_API_KEY" \
297298
-H 'Content-Type: application/json'
298299
```

0 commit comments

Comments
 (0)