Skip to content

Commit ee16668

Browse files
committed
updating api version
1 parent 73e60b1 commit ee16668

File tree

2 files changed

+42
-5
lines changed

2 files changed

+42
-5
lines changed

articles/ai-services/openai/references/azure-search.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ The configurable options of Azure AI Search when using Azure OpenAI On Your Data
2727
|--- | --- | --- | --- |
2828
| `endpoint` | string | True | The absolute endpoint path for the Azure Search resource to use.|
2929
| `index_name` | string | True | The name of the index to use in the referenced Azure Search resource.|
30-
| `authentication`| One of [ApiKeyAuthenticationOptions](#api-key-authentication-options), [SystemAssignedManagedIdentityAuthenticationOptions](#system-assigned-managed-identity-authentication-options), [UserAssignedManagedIdentityAuthenticationOptions](#user-assigned-managed-identity-authentication-options) | True | The authentication method to use when accessing the defined data source. |
30+
| `authentication`| One of [ApiKeyAuthenticationOptions](#api-key-authentication-options), [SystemAssignedManagedIdentityAuthenticationOptions](#system-assigned-managed-identity-authentication-options), [UserAssignedManagedIdentityAuthenticationOptions](#user-assigned-managed-identity-authentication-options), [onYourDataAccessTokenAuthenticationOptions](#access-token-authentication-options) | True | The authentication method to use when accessing the defined data source. |
3131
| `embedding_dependency` | One of [DeploymentNameVectorizationSource](#deployment-name-vectorization-source), [EndpointVectorizationSource](#endpoint-vectorization-source) | False | The embedding dependency for vector search. Required when `query_type` is `vector`, `vector_simple_hybrid`, or `vector_semantic_hybrid`.|
3232
| `fields_mapping` | [FieldsMappingOptions](#fields-mapping-options) | False | Customized field mapping behavior to use when interacting with the search index.|
3333
| `filter`| string | False | Search filter. |
@@ -37,6 +37,10 @@ The configurable options of Azure AI Search when using Azure OpenAI On Your Data
3737
| `semantic_configuration` | string | False | The semantic configuration for the query. Required when `query_type` is `semantic` or `vector_semantic_hybrid`.|
3838
| `strictness` | integer | False | The configured strictness of the search relevance filtering. The higher of strictness, the higher of the precision but lower recall of the answer. Default is `3`.|
3939
| `top_n_documents` | integer | False | The configured top number of documents to feature for the configured query. Default is `5`. |
40+
| `max_search_queries` | integer | False | The max number of rewritten queries should be send to search provider for one user message. If not specified, the system will decide the number of queries to send. |
41+
| `allow_partial_result` | integer | False | If specified as true, the system will allow partial search results to be used and the request fails if all the queries fail. If not specified, or specified as false, the request will fail if any search query fails. |
42+
| `include_contexts` | array | False | The included properties of the output context. If not specified, the default value is `citations` and `intent`. Values can be `citations`,`intent`, `all_retrieved_documents`.|
43+
4044

4145
## API key authentication options
4246

@@ -64,6 +68,15 @@ The authentication options for Azure OpenAI On Your Data when using a user-assig
6468
| `managed_identity_resource_id`|string|True|The resource ID of the user-assigned managed identity to use for authentication.|
6569
| `type`|string|True| Must be `user_assigned_managed_identity`.|
6670

71+
## Access token authentication options
72+
73+
The authentication options for Azure OpenAI On Your Data when using access token.
74+
75+
|Name | Type | Required | Description |
76+
|--- | --- | --- | --- |
77+
| `access_token`|string|True|The access token to use for authentication.|
78+
| `type` | string | True | Must be `access_token`. |
79+
6780
## Deployment name vectorization source
6881

6982
The details of the vectorization source, used by Azure OpenAI On Your Data when applying vector search. This vectorization source is based on an internal embeddings model deployment name in the same Azure OpenAI resource. This vectorization source enables you to use vector search without Azure OpenAI api-key and without Azure OpenAI public network access.
@@ -72,6 +85,7 @@ The details of the vectorization source, used by Azure OpenAI On Your Data when
7285
|--- | --- | --- | --- |
7386
| `deployment_name`|string|True|The embedding model deployment name within the same Azure OpenAI resource. |
7487
| `type`|string|True| Must be `deployment_name`.|
88+
| `dimensions`|integer|False| The number of dimensions the embeddings should have. Only supported in `text-embedding-3` and later models. |
7589

7690
## Endpoint vectorization source
7791

@@ -82,6 +96,8 @@ The details of the vectorization source, used by Azure OpenAI On Your Data when
8296
| `endpoint`|string|True|Specifies the resource endpoint URL from which embeddings should be retrieved. It should be in the format of `https://{YOUR_RESOURCE_NAME}.openai.azure.com/openai/deployments/YOUR_DEPLOYMENT_NAME/embeddings`. The api-version query parameter isn't allowed.|
8397
| `authentication`| [ApiKeyAuthenticationOptions](#api-key-authentication-options)|True | Specifies the authentication options to use when retrieving embeddings from the specified endpoint.|
8498
| `type`|string|True| Must be `endpoint`.|
99+
| `dimensions`|integer|False| The number of dimensions the embeddings should have. Only supported in `text-embedding-3` and later models. |
100+
85101

86102
## Fields mapping options
87103

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

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ ms.custom: devx-track-python
1414

1515
# Azure OpenAI On Your Data API Reference
1616

17-
This article provides reference documentation for Python and REST for the new Azure OpenAI On Your Data API. The latest API version is `2024-02-01` [Swagger spec](https://github.com/Azure/azure-rest-api-specs/tree/main/specification/cognitiveservices/data-plane/AzureOpenAI/inference/stable/2024-02-01).
17+
This article provides reference documentation for Python and REST for the new Azure OpenAI On Your Data API. The latest API version is `2024-05-01-preview` [Swagger spec](https://github.com/Azure/azure-rest-api-specs/tree/main/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-05-01-preview).
1818

1919
> [!NOTE]
2020
> Since API version `2024-02-15-preview` we introduced the following breaking changes comparing to earlier API versions:
@@ -30,9 +30,10 @@ POST {endpoint}/openai/deployments/{deployment-id}/chat/completions?api-version=
3030
**Supported versions**
3131
* `2024-02-15-preview` [Swagger spec](https://github.com/Azure/azure-rest-api-specs/blob/main/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-02-15-preview/inference.json).
3232
* `2024-02-01` [Swagger spec](https://github.com/Azure/azure-rest-api-specs/tree/main/specification/cognitiveservices/data-plane/AzureOpenAI/inference/stable/2024-02-01).
33+
* `2024-05-01-preview` [Swagger spec](https://github.com/Azure/azure-rest-api-specs/tree/main/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-05-01-preview)
3334

3435
> [!NOTE]
35-
> [Azure Machine learning indexes](./azure-machine-learning.md), [Pinecone](./pinecone.md), and [Elasticsearch](./elasticsearch.md) are only supported in the `2024-02-15-preview` API version as a preview.
36+
> [Azure Machine learning indexes](./azure-machine-learning.md), [Pinecone](./pinecone.md), and [Elasticsearch](./elasticsearch.md) are supported as a preview.
3637
3738
## URI parameters
3839

@@ -67,6 +68,8 @@ The response assistant message schema inherits from the chat completions assista
6768
|--- | --- | --- | --- |
6869
| `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. |
6970
| `intent` | string | False | The detected intent from the chat history. Passing back the previous intent is no longer needed. Ignore this property. |
71+
| `all_retrieved_documents` | [Retrieved documents](#retrieved-documents)[] | False | All the retrieved documents. |
72+
7073

7174
## Citation
7275

@@ -78,6 +81,24 @@ The response assistant message schema inherits from the chat completions assista
7881
| `filepath` | string | False | The file path of the citation.|
7982
| `chunk_id` | string | False | The chunk ID of the citation.|
8083

84+
## Retrieved documents
85+
86+
|Name | Type | Required | Description |
87+
|--- | --- | --- | --- |
88+
| `search_queries` | string[] | True | The search queries used to retrieve the document. |
89+
| `data_source_index` | integer | True | The index of the data source. |
90+
| `original_search_score` | double | True | The original search score of the retrieved document. |
91+
| `rerank_score` | double | False | The rerank score of the retrieved document. |
92+
| `filter_reason` | [] | False | Represents the rationale for filtering the document. If the document does not undergo filtering, this field will remain unset. |
93+
94+
## Filter reason
95+
96+
|Name | Type | Required | Description |
97+
|--- | --- | --- | --- |
98+
| `filterReason` | string | False | The filtering reason of the retrieved document. Will be `score` if the document is filtered by original search score threshold defined by `strictness`. Will be `rerank` if the document is not filtered by original search score threshold, but is filtered by rerank score and `top_n_documents`. |
99+
100+
101+
81102
## Data source
82103

83104
This list shows the supported data sources.
@@ -124,7 +145,7 @@ token_provider = get_bearer_token_provider(DefaultAzureCredential(), "https://co
124145
client = AzureOpenAI(
125146
azure_endpoint=endpoint,
126147
azure_ad_token_provider=token_provider,
127-
api_version="2024-02-01",
148+
api_version="2024-05-01-preview",
128149
)
129150

130151
completion = client.chat.completions.create(
@@ -167,7 +188,7 @@ print(completion.model_dump_json(indent=2))
167188

168189
```bash
169190
az rest --method POST \
170-
--uri $AzureOpenAIEndpoint/openai/deployments/$ChatCompletionsDeploymentName/chat/completions?api-version=2024-02-01 \
191+
--uri $AzureOpenAIEndpoint/openai/deployments/$ChatCompletionsDeploymentName/chat/completions?api-version=2024-05-01-preview \
171192
--resource https://cognitiveservices.azure.com/ \
172193
--body \
173194
'

0 commit comments

Comments
 (0)