Skip to content

Commit 5719991

Browse files
authored
Merge pull request #717 from MicrosoftDocs/main
10/9 11:00 AM IST Publish
2 parents eb045a9 + 50860a1 commit 5719991

File tree

3 files changed

+46
-9
lines changed

3 files changed

+46
-9
lines changed

.github/policies/disallow-edits.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: GitOps.PullRequestIssueManagement
2+
description: GitOps.PullRequestIssueManagement primitive
3+
resource: repository
4+
5+
configuration:
6+
resourceManagementConfiguration:
7+
eventResponderTasks:
8+
- description: Close PRs that introduce an index file into the repository.
9+
if:
10+
- payloadType: Pull_Request
11+
- isAction:
12+
action: Opened
13+
- or:
14+
- filesMatchPattern:
15+
pattern: articles/index.yml
16+
then:
17+
- addReply:
18+
reply: >-
19+
@${issueAuthor} - You tried to add an index file to this repository; this is not permitted so your pull request will be closed automatically.
20+
- closePullRequest
21+

articles/ai-services/openai/includes/ai-search-ingestion.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,16 @@ manager: nitinme
33
ms.service: azure-ai-studio
44
ms.custom:
55
ms.topic: include
6-
ms.date: 03/25/2024
6+
ms.date: 10/08/2024
77
ms.author: aahi
88
author: aahill
99
---
1010

1111
### How data is ingested into Azure AI search
1212

13-
Data is ingested into Azure AI search using the following process:
13+
As of September 2024, the ingestion APIs switched to [integrated vectorization](/azure/search/vector-search-integrated-vectorization). This update does **not** alter the existing API contracts. Integrated vectorization, a new offering of Azure AI Search, utilizes prebuilt skills for chunking and embedding the input data. The Azure OpenAI On Your Data ingestion service no longer employs custom skills. Following the migration to integrated vectorization, the ingestion process has undergone some modifications and as a result only the following assets are created:
14+
* `{job-id}-index`
15+
* `{job-id}-indexer`, if an hourly or daily schedule is specified, otherwise, the indexer is cleaned-up at the end of the ingestion process.
16+
* `{job-id}-datasource`
1417

15-
1. Ingestion assets are created in Azure AI Search resource and Azure storage account. Currently these assets are: indexers, indexes, data sources, a [custom skill](/azure/search/cognitive-search-custom-skill-interface) in the search resource, and a container (later called the chunks container) in the Azure storage account. You can specify the input Azure storage container using the [Azure OpenAI studio](https://oai.azure.com/), or the [ingestion API (preview)](/rest/api/azureopenai/ingestion-jobs). By default, text is assumed to use the UTF-8 encoding. To specify a different encoding, use the encoding configuration property. See the [.NET documentation](/dotnet/fundamentals/runtime-libraries/system-text-encoding#list-of-encodings) for a list of supported encodings.
16-
17-
2. Data is read from the input container, contents are opened and chunked into small chunks with a maximum of 1,024 tokens each. If vector search is enabled, the service calculates the vector representing the embeddings on each chunk. The output of this step (called the "preprocessed" or "chunked" data) is stored in the chunks container created in the previous step.
18-
19-
3. The preprocessed data is loaded from the chunks container, and indexed in the Azure AI Search index.
18+
The chunks container is no longer available, as this functionality is now inherently managed by Azure AI Search.

articles/ai-studio/how-to/develop/llama-index.md

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ export AZURE_INFERENCE_ENDPOINT="<your-model-endpoint-goes-here>"
6767
export AZURE_INFERENCE_CREDENTIAL="<your-key-goes-here>"
6868
```
6969
70-
Once configured, create a client to connect to the endpoint:
70+
Once configured, create a client to connect to the endpoint. The parameter `model_name` in the constructor is not required for endpoints serving a single model, like serverless endpoints.
7171
7272
```python
7373
import os
@@ -80,7 +80,7 @@ llm = AzureAICompletionsModel(
8080
```
8181
8282
> [!TIP]
83-
> The parameter `model_name` in the constructor is not required for endpoints serving a single model, like serverless endpoints).
83+
> If your model is an OpenAI model deployed to Azure OpenAI service or AI services resource, configure the client as indicated at [Azure OpenAI models](#azure-openai-models).
8484
8585
Alternatively, if your endpoint support Microsoft Entra ID, you can use the following code to create the client:
8686
@@ -112,6 +112,23 @@ llm = AzureAICompletionsModel(
112112
)
113113
```
114114

115+
### Azure OpenAI models
116+
117+
If you are using Azure OpenAI models with key-based authentication, you need to pass the authentication key in the header `api-key`, which is the one expected in the Azure OpenAI service and in Azure AI Services. This configuration is not required if you are using Microsoft Entra ID (formerly known as Azure AD). The following example shows how to configure the client:
118+
119+
```python
120+
import os
121+
from llama_index.llms.azure_inference import AzureAICompletionsModel
122+
123+
llm = AzureAICompletionsModel(
124+
endpoint=os.environ["AZURE_INFERENCE_ENDPOINT"],
125+
credential="",
126+
client_kwargs={"headers" : { "api-key": os.environ["AZURE_INFERENCE_CREDENTIAL"] } }
127+
)
128+
```
129+
130+
Notice that `credentials` is still being passed with an empty value since it's a required parameter.
131+
115132
### Inference parameters
116133
117134
You can configure how inference in performed for all the operations that are using this client by setting extra parameters. This helps avoid indicating them on each call you make to the model.

0 commit comments

Comments
 (0)