Skip to content

Commit a7613b8

Browse files
committed
prev i
1 parent 9b9b551 commit a7613b8

File tree

2 files changed

+6
-42
lines changed

2 files changed

+6
-42
lines changed

articles/ai-services/openai/concepts/use-your-data.md

Lines changed: 1 addition & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -383,40 +383,8 @@ You can send a streaming request using the `stream` parameter, allowing data to
383383

384384
#### Conversation history for better results
385385

386-
When you chat with a model, providing a history of the chat will help the model return higher quality results.
386+
When you chat with a model, providing a history of the chat will help the model return higher quality results. You don't need to include the [`context` property](../references/on-your-data.md#context) of the assistant messages since 2024. See [example from the API reference](../references/on-your-data.md#examples).
387387

388-
```json
389-
{
390-
"dataSources": [
391-
{
392-
"type": "AzureCognitiveSearch",
393-
"parameters": {
394-
"endpoint": "'$AZURE_AI_SEARCH_ENDPOINT'",
395-
"key": "'$AZURE_AI_SEARCH_API_KEY'",
396-
"indexName": "'$AZURE_AI_SEARCH_INDEX'"
397-
}
398-
}
399-
],
400-
"messages": [
401-
{
402-
"role": "user",
403-
"content": "What are the differences between Azure Machine Learning and Azure AI services?"
404-
},
405-
{
406-
"role": "tool",
407-
"content": "{\"citations\": [{\"content\": \"title: Azure AI services and Machine Learning\\ntitleSuffix: Azure AI services\\ndescription: Learn where Azure AI services fits in with other Azure offerings for machine learning.\\nAzure AI services and machine learning\\nAzure AI services provides machine learning capabilities to solve general problems such as...\\n \"articles\\\\cognitive-services\\\\cognitive-services-and-machine-learning.md\", \"url\": null, \"metadata\": {\"chunking\": \"orignal document size=1018. Scores=0.32200050354003906 and 1.2880020141601562.Org Highlight count=115.\"}, \"chunk_id\": \"0\"}], \"intent\": \"[\\\"What are the differences between Azure Machine Learning and Azure AI services?\\\"]\"}"
408-
},
409-
{
410-
"role": "assistant",
411-
"content": " \nAzure Machine Learning is a product and service tailored for data scientists to build, train, and deploy machine learning models [doc1]..."
412-
},
413-
{
414-
"role": "user",
415-
"content": "How do I use Azure machine learning?"
416-
}
417-
]
418-
}
419-
```
420388

421389
## Token usage estimation for Azure OpenAI On Your Data
422390

articles/ai-services/openai/references/on-your-data.md

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ The request body inherits the same schema of chat completions API request. This
4141

4242
|Name | Type | Required | Description |
4343
|--- | --- | --- | --- |
44-
| `messages` | [ChatMessage](#chat-message)[] | True | The array of messages to generate chat completions for, in the chat format. The [request chat message](#chat-message) has a `context` property, which is added for Azure OpenAI On Your Data.|
4544
| `data_sources` | [DataSource](#data-source)[] | True | The configuration entries for Azure OpenAI On Your Data. There must be exactly one element in the array. If `data_sources` is not provided, the service uses chat completions model directly, and does not use Azure OpenAI On Your Data.|
4645

4746
## Response body
@@ -50,17 +49,17 @@ The response body inherits the same schema of chat completions API response. The
5049

5150
## Chat message
5251

53-
In both request and response, when the chat message `role` is `assistant`, the chat message schema inherits from the chat completions assistant chat message, and is extended with the property `context`.
52+
The response assistant message schema inherits from the chat completions assistant [chat message](../reference.md#chatmessage), and is extended with the property `context`.
5453

5554
|Name | Type | Required | Description |
5655
|--- | --- | --- | --- |
57-
| `context` | [Context](#context) | False | Represents the incremental steps performed by the Azure OpenAI On Your Data while processing the request, including the detected search intent and the retrieved documents. |
56+
| `context` | [Context](#context) | False | Represents the incremental steps performed by the Azure OpenAI On Your Data while processing the request, including the retrieved documents. |
5857

5958
## Context
6059
|Name | Type | Required | Description |
6160
|--- | --- | --- | --- |
62-
| `citations` | [Citation](#citation)[] | False | The data source retrieval result, used to generate the assistant message in the response.|
63-
| `intent` | string | False | The detected intent from the chat history, used to pass to the next turn to carry over the context.|
61+
| `citations` | [Citation](#citation)[] | False | The data source retrieval result, used to generate the assistant message in the response. Clients can render references from the citations. |
62+
| `intent` | string | False | The detected intent from the chat history. This is deprecated. |
6463

6564
## Citation
6665

@@ -84,7 +83,7 @@ This list shows the supported data sources.
8483

8584
## Examples
8685

87-
This example shows how to pass context with conversation history for better results.
86+
This example shows how to pass conversation history for better results.
8887

8988
Prerequisites:
9089
* Configure the role assignments from Azure OpenAI system assigned managed identity to Azure search service. Required roles: `Search Index Data Reader`, `Search Service Contributor`.
@@ -131,9 +130,6 @@ completion = client.chat.completions.create(
131130
{
132131
"role": "assistant",
133132
"content": "DRI stands for Directly Responsible Individual of a service. Which service are you asking about?",
134-
"context": {
135-
"intent": "[\"Who is DRI?\", \"What is the meaning of DRI?\", \"Define DRI\"]"
136-
}
137133
},
138134
{
139135
"role": "user",

0 commit comments

Comments
 (0)