Skip to content

Commit 1f30842

Browse files
Merge branch 'main' of https://github.com/MicrosoftDocs/azure-docs-pr into auth-recs
2 parents c9db788 + a48d8f3 commit 1f30842

File tree

304 files changed

+4170
-1298
lines changed

Some content is hidden

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

304 files changed

+4170
-1298
lines changed

.openpublishing.redirection.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3430,6 +3430,12 @@
34303430
"redirect_url": "/azure/ai-services/anomaly-detector/quickstarts/detect-data-anomalies-python",
34313431
"redirect_document_id": false
34323432
},
3433+
{
3434+
"source_path_from_root": "/articles/ai-studio/how-to/model-catalog.md",
3435+
"redirect_url": "/azure/ai-studio/how-to/model-catalog-overview",
3436+
"redirect_document_id": false
3437+
},
3438+
34333439
{
34343440
"source_path_from_root": "/articles/service-fabric/upgrade-managed-disks.md",
34353441
"redirect_url": "/azure/service-fabric/service-fabric-scale-up-primary-node-type",
@@ -4024,6 +4030,11 @@
40244030
"source_path_from_root":"/articles/aks/generation-2-vm-windows.md",
40254031
"redirect_url":"/azure/aks/generation-2-vm",
40264032
"redirect_document_id":false
4033+
},
4034+
{
4035+
"source_path_from_root":"/articles/cosmos-db/high-availability.md",
4036+
"redirect_url":"/azure/reliability/reliability-cosmos-db-nosql.md",
4037+
"redirect_document_id":false
40274038
}
40284039
]
40294040
}

articles/active-directory-b2c/custom-policies-series-sign-up-or-sign-in-federation.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ Notice the claims transformations we defined in [step 3.2](#step-32---define-cla
225225

226226
Just like in sign-in with a local account, you need to configure the [Microsoft Entra Technical Profiles](active-directory-technical-profile.md), which you use to connect to Microsoft Entra ID storage, to store or read a user social account.
227227

228-
1. In the `ContosoCustomPolicy.XML` file, locate the `AAD-UserRead` technical profile and then add a new technical profile by using the following code:
228+
1. In the `ContosoCustomPolicy.XML` file, locate the `AAD-UserRead` technical profile and then add a new technical profile below it by using the following code:
229229

230230
```xml
231231
<TechnicalProfile Id="AAD-UserWriteUsingAlternativeSecurityId">
@@ -517,6 +517,7 @@ Use the following steps to add a combined local and social account:
517517
```xml
518518
<OutputClaim ClaimTypeReferenceId="authenticationSource" DefaultValue="localIdpAuthentication" AlwaysUseDefaultValue="true" />
519519
```
520+
Make sure you also add the `authenticationSource` claim in the output claims collection of the `UserSignInCollector` self-asserted technical profile.
520521

521522
1. In the `UserJourneys` section, add a new user journey, `LocalAndSocialSignInAndSignUp` by using the following code:
522523

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

Lines changed: 113 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: Learn how to use Azure OpenAI's Python & REST API runs with Assista
55
manager: nitinme
66
ms.service: azure-ai-openai
77
ms.topic: conceptual
8-
ms.date: 02/01/2024
8+
ms.date: 04/16/2024
99
author: mrbullwinkle
1010
ms.author: mbullwin
1111
recommendations: false
@@ -585,3 +585,115 @@ Represent a step in execution of a run.
585585
| `failed_at`| integer or null | The Unix timestamp (in seconds) for when the run step failed.|
586586
| `completed_at`| integer or null | The Unix timestamp (in seconds) for when the run step completed.|
587587
| `metadata`| map | 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.|
588+
589+
## Stream a run result (preview)
590+
591+
Stream the result of executing a Run or resuming a Run after submitting tool outputs. You can stream events after:
592+
* [Create Thread and Run](#create-thread-and-run)
593+
* [Create Run](#create-run)
594+
* [Submit Tool Outputs](#submit-tool-outputs-to-run)
595+
596+
To stream a result, pass `"stream": true` while creating a run. The response will be a [Server-Sent events](https://html.spec.whatwg.org/multipage/server-sent-events.html#server-sent-events) stream.
597+
598+
### Streaming example
599+
600+
```python
601+
from typing_extensions import override
602+
from openai import AssistantEventHandler
603+
604+
# First, we create a EventHandler class to define
605+
# how we want to handle the events in the response stream.
606+
607+
class EventHandler(AssistantEventHandler):
608+
@override
609+
def on_text_created(self, text) -> None:
610+
print(f"\nassistant > ", end="", flush=True)
611+
612+
@override
613+
def on_text_delta(self, delta, snapshot):
614+
print(delta.value, end="", flush=True)
615+
616+
def on_tool_call_created(self, tool_call):
617+
print(f"\nassistant > {tool_call.type}\n", flush=True)
618+
619+
def on_tool_call_delta(self, delta, snapshot):
620+
if delta.type == 'code_interpreter':
621+
if delta.code_interpreter.input:
622+
print(delta.code_interpreter.input, end="", flush=True)
623+
if delta.code_interpreter.outputs:
624+
print(f"\n\noutput >", flush=True)
625+
for output in delta.code_interpreter.outputs:
626+
if output.type == "logs":
627+
print(f"\n{output.logs}", flush=True)
628+
629+
# Then, we use the `create_and_stream` SDK helper
630+
# with the `EventHandler` class to create the Run
631+
# and stream the response.
632+
633+
with client.beta.threads.runs.stream(
634+
thread_id=thread.id,
635+
assistant_id=assistant.id,
636+
instructions="Please address the user as Jane Doe. The user has a premium account.",
637+
event_handler=EventHandler(),
638+
) as stream:
639+
stream.until_done()
640+
```
641+
642+
643+
## Message delta object
644+
645+
Represents a message delta. For example any changed fields on a message during streaming.
646+
647+
|Name | Type | Description |
648+
|--- |--- |--- |
649+
| `id` | string | The identifier of the message, which can be referenced in API endpoints. |
650+
| `object` | string | The object type, which is always `thread.message.delta`. |
651+
| `delta` | object | The delta containing the fields that have changed on the Message. |
652+
653+
## Run step delta object
654+
655+
Represents a run step delta. For example any changed fields on a run step during streaming.
656+
657+
|Name | Type | Description |
658+
|--- |--- |--- |
659+
| `id` | string | The identifier of the run step, which can be referenced in API endpoints. |
660+
| `object` | string | The object type, which is always `thread.run.step.delta`. |
661+
| `delta` | object | The delta containing the fields that have changed on the run step.
662+
663+
## Assistant stream events
664+
665+
Represents an event emitted when streaming a Run. Each event in a server-sent events stream has an event and data property:
666+
667+
```json
668+
event: thread.created
669+
data: {"id": "thread_123", "object": "thread", ...}
670+
```
671+
672+
Events are emitted whenever a new object is created, transitions to a new state, or is being streamed in parts (deltas). For example, `thread.run.created` is emitted when a new run is created, `thread.run.completed` when a run completes, and so on. When an Assistant chooses to create a message during a run, we emit a `thread.message.created` event, a `thread.message.in_progress` event, many thread.`message.delta` events, and finally a `thread.message.completed` event.
673+
674+
|Name | Type | Description |
675+
|--- |--- |--- |
676+
| `thread.created` | `data` is a thread. | Occurs when a new thread is created. |
677+
| `thread.run.created` | `data` is a run. | Occurs when a new run is created. |
678+
| `thread.run.queued` | `data` is a run. | Occurs when a run moves to a queued status. |
679+
| `thread.run.in_progress` | `data` is a run. | Occurs when a run moves to an in_progress status. |
680+
| `thread.run.requires_action` | `data` is a run. | Occurs when a run moves to a `requires_action` status. |
681+
| `thread.run.completed` | `data` is a run. | Occurs when a run is completed. |
682+
| `thread.run.failed` | `data` is a run. | Occurs when a run fails. |
683+
| `thread.run.cancelling` | `data` is a run. | Occurs when a run moves to a `cancelling` status. |
684+
| `thread.run.cancelled` | `data` is a run. | Occurs when a run is cancelled. |
685+
| `thread.run.expired` | `data` is a run. | Occurs when a run expires. |
686+
| `thread.run.step.created` | `data` is a run step. | Occurs when a run step is created. |
687+
| `thread.run.step.in_progress` | `data` is a run step. | Occurs when a run step moves to an `in_progress` state. |
688+
| `thread.run.step.delta` | `data` is a run step delta. | Occurs when parts of a run step are being streamed. |
689+
| `thread.run.step.completed` | `data` is a run step. | Occurs when a run step is completed. |
690+
| `thread.run.step.failed` | `data` is a run step. | Occurs when a run step fails. |
691+
| `thread.run.step.cancelled` | `data` is a run step. | Occurs when a run step is cancelled. |
692+
| `thread.run.step.expired` | `data` is a run step. | Occurs when a run step expires. |
693+
| `thread.message.created` | `data` is a message. | Occurs when a message is created. |
694+
| `thread.message.in_progress` | `data` is a message. | Occurs when a message moves to an in_progress state. |
695+
| `thread.message.delta` | `data` is a message delta. | Occurs when parts of a Message are being streamed. |
696+
| `thread.message.completed` | `data` is a message. | Occurs when a message is completed. |
697+
| `thread.message.incomplete` | `data` is a message. | Occurs when a message ends before it is completed. |
698+
| `error` | `data` is an error. | Occurs when an error occurs. This can happen due to an internal server error or a timeout. |
699+
| `done` | `data` is `[DONE]` | Occurs when a stream ends. |

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

Lines changed: 28 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -62,59 +62,15 @@ The [Integrated Vector Database in vCore-based Azure Cosmos DB for MongoDB](/azu
6262

6363
For some data sources such as uploading files from your local machine (preview) or data contained in a blob storage account (preview), Azure AI Search is used. When you choose the following data sources, your data is ingested into an Azure AI Search index.
6464

65-
>[!TIP]
66-
>If you use Azure Cosmos DB (except for its vCore-based API for MongoDB), you may be eligible for the [Azure AI Advantage offer](/azure/cosmos-db/ai-advantage), which provides the equivalent of up to $6,000 in Azure Cosmos DB throughput credits.
67-
68-
|Data source | Description |
65+
|Data ingested through Azure AI Search | Description |
6966
|---------|---------|
7067
| [Azure AI Search](/azure/search/search-what-is-azure-search) | Use an existing Azure AI Search index with Azure OpenAI On Your Data. |
71-
| [Azure Cosmos DB](/azure/cosmos-db/introduction) | Azure Cosmos DB's API for Postgres and vCore-based API for MongoDB offer natively integrated vector indexing; therefore, they don't require Azure AI Search. However, its other APIs do require Azure AI Search for vector indexing. Azure Cosmos DB for NoSQL's natively integrated vector database debuts in mid-2024. |
7268
|Upload files (preview) | Upload files from your local machine to be stored in an Azure Blob Storage database, and ingested into Azure AI Search. |
7369
|URL/Web address (preview) | Web content from the URLs is stored in Azure Blob Storage. |
7470
|Azure Blob Storage (preview) | Upload files from Azure Blob Storage to be ingested into an Azure AI Search index. |
7571

7672
:::image type="content" source="../media/use-your-data/azure-databases-and-ai-search.png" lightbox="../media/use-your-data/azure-databases-and-ai-search.png" alt-text="Diagram of vector indexing services.":::
7773

78-
# [Vector Database in Azure Cosmos DB for MongoDB](#tab/mongo-db)
79-
80-
### Prerequisites
81-
* [vCore-based Azure Cosmos DB for MongoDB](/azure/cosmos-db/mongodb/vcore/introduction) account
82-
* A deployed [embedding model](../concepts/understand-embeddings.md)
83-
84-
### Limitations
85-
* Only vCore-based Azure Cosmos DB for MongoDB is supported.
86-
* The search type is limited to [Integrated Vector Database in Azure Cosmos DB for MongoDB](/azure/cosmos-db/mongodb/vcore/vector-search) with an Azure OpenAI embedding model.
87-
* This implementation works best on unstructured and spatial data.
88-
89-
90-
### Data preparation
91-
92-
Use the script provided on [GitHub](https://github.com/microsoft/sample-app-aoai-chatGPT/tree/main/scripts#data-preparation) to prepare your data.
93-
94-
<!--### Add your data source in Azure OpenAI Studio
95-
96-
To add vCore-based Azure Cosmos DB for MongoDB as a data source, you'll need an existing Azure Cosmos DB for MongoDB index containing your data, and a deployed Azure OpenAI Ada embeddings model that will be used for vector search.
97-
98-
1. In the [Azure OpenAI portal](https://oai.azure.com/portal) chat playground, select **Add your data**. In the panel that appears, select ** vCore-based Azure Cosmos DB for MongoDB** as the data source.
99-
1. Select your Azure subscription and database account, then connect to your Azure Cosmos DB account by providing your Azure Cosmos DB account username and password.
100-
101-
:::image type="content" source="../media/use-your-data/add-mongo-data-source.png" alt-text="A screenshot showing the screen for adding Mongo DB as a data source in Azure OpenAI Studio." lightbox="../media/use-your-data/add-mongo-data-source.png":::
102-
103-
1. **Select Database**. In the dropdown menus, select the database name, database collection, and index name that you want to use as your data source. Select the embedding model deployment you would like to use for vector search on this data source, and acknowledge that you'll incur charges for using vector search. Then select **Next**.
104-
105-
:::image type="content" source="../media/use-your-data/select-mongo-database.png" alt-text="A screenshot showing the screen for adding Mongo DB settings in Azure OpenAI Studio." lightbox="../media/use-your-data/select-mongo-database.png":::
106-
-->
107-
108-
### Index field mapping
109-
110-
When you add your vCore-based Azure Cosmos DB for MongoDB data source, you can specify data fields to properly map your data for retrieval.
111-
112-
* Content data (required): One or more provided fields to be used to ground the model on your data. For multiple fields, separate the values with commas, with no spaces.
113-
* File name/title/URL: Used to display more information when a document is referenced in the chat.
114-
* Vector fields (required): Select the field in your database that contains the vectors.
115-
116-
:::image type="content" source="../media/use-your-data/mongo-index-mapping.png" alt-text="A screenshot showing the index field mapping options for Mongo DB." lightbox="../media/use-your-data/mongo-index-mapping.png":::
117-
11874
# [Azure AI Search](#tab/ai-search)
11975

12076
You might want to consider using an Azure AI Search index when you either want to:
@@ -179,6 +135,33 @@ If you want to implement additional value-based criteria for query execution, yo
179135

180136
[!INCLUDE [ai-search-ingestion](../includes/ai-search-ingestion.md)]
181137

138+
139+
# [Vector Database in Azure Cosmos DB for MongoDB](#tab/mongo-db)
140+
141+
### Prerequisites
142+
* [vCore-based Azure Cosmos DB for MongoDB](/azure/cosmos-db/mongodb/vcore/introduction) account
143+
* A deployed [embedding model](../concepts/understand-embeddings.md)
144+
145+
### Limitations
146+
* Only vCore-based Azure Cosmos DB for MongoDB is supported.
147+
* The search type is limited to [Integrated Vector Database in Azure Cosmos DB for MongoDB](/azure/cosmos-db/mongodb/vcore/vector-search) with an Azure OpenAI embedding model.
148+
* This implementation works best on unstructured and spatial data.
149+
150+
151+
### Data preparation
152+
153+
Use the script provided on [GitHub](https://github.com/microsoft/sample-app-aoai-chatGPT/tree/main/scripts#data-preparation) to prepare your data.
154+
155+
### Index field mapping
156+
157+
When you add your vCore-based Azure Cosmos DB for MongoDB data source, you can specify data fields to properly map your data for retrieval.
158+
159+
* Content data (required): One or more provided fields to be used to ground the model on your data. For multiple fields, separate the values with commas, with no spaces.
160+
* File name/title/URL: Used to display more information when a document is referenced in the chat.
161+
* Vector fields (required): Select the field in your database that contains the vectors.
162+
163+
:::image type="content" source="../media/use-your-data/mongo-index-mapping.png" alt-text="A screenshot showing the index field mapping options for Mongo DB." lightbox="../media/use-your-data/mongo-index-mapping.png":::
164+
182165
# [Azure Blob Storage (preview)](#tab/blob-storage)
183166

184167
You might want to use Azure Blob Storage as a data source if you want to connect to existing Azure Blob Storage and use files stored in your containers.

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ ms.service: azure-ai-openai
88
ms.topic: quickstart
99
author: aahill
1010
ms.author: aahi
11-
ms.date: 11/02/2023
11+
ms.date: 05/09/2024
1212
recommendations: false
1313
---
1414

@@ -17,7 +17,7 @@ recommendations: false
1717
Use this article to learn how to provide your own image data for GPT-4 Turbo with Vision, Azure OpenAI’s vision model. GPT-4 Turbo with Vision on your data allows the model to generate more customized and targeted answers using Retrieval Augmented Generation based on your own images and image metadata.
1818

1919
> [!IMPORTANT]
20-
> This article is for using your data on the GPT-4 Turbo with Vision model. If you are interested in using your data for text-based models, see [Use your text data](./use-your-data.md).
20+
> Once the GPT4-Turbo with vision preview model is deprecated, you will no longer be able to use Azure OpenAI On your image data. To implement a Retrieval Augmented Generation (RAG) solution with image data, see the following sample on [github](https://github.com/Azure-Samples/azure-search-openai-demo/).
2121
2222
## Prerequisites
2323

articles/ai-services/openai/how-to/use-web-app.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ ms.service: azure-ai-openai
77
ms.topic: how-to
88
author: aahill
99
ms.author: aahi
10-
ms.date: 03/27/2024
10+
ms.date: 05/09/2024
1111
recommendations: false
1212
---
1313

@@ -22,7 +22,7 @@ Along with Azure OpenAI Studio, APIs and SDKs, you can also use the available st
2222

2323
- Publishing creates an Azure App Service in your subscription. It might incur costs depending on the [pricing plan](https://azure.microsoft.com/pricing/details/app-service/windows/) you select. When you're done with your app, you can delete it from the Azure portal.
2424
- By default, the app will be deployed with the Microsoft identity provider already configured, restricting access to the app to members of your Azure tenant. To add or modify authentication:
25-
25+
- gpt-4 vision-preview models are not supported.
2626
1. Go to the [Azure portal](https://portal.azure.com/#home) and search for the app name you specified during publishing. Select the web app, and go to the **Authentication** tab on the left navigation menu. Then select **Add an identity provider**.
2727

2828
:::image type="content" source="../media/quickstarts/web-app-authentication.png" alt-text="Screenshot of the authentication page in the Azure portal." lightbox="../media/quickstarts/web-app-authentication.png":::
@@ -77,7 +77,7 @@ Consider either clicking the **watch** or **star** buttons on the web app's [Git
7777

7878
You can enable chat history for your users of the web app. When you enable the feature, your users will have access to their individual previous queries and responses.
7979

80-
To enable chat history, deploy or redeploy your model as a web app using [Azure OpenAI Studio](https://oai.azure.com/portal)
80+
To enable chat history, deploy or redeploy your model as a web app using [Azure OpenAI Studio](https://oai.azure.com/portal).
8181

8282
:::image type="content" source="../media/use-your-data/enable-chat-history.png" alt-text="A screenshot of the chat history enablement button on Azure OpenAI studio." lightbox="../media/use-your-data/enable-chat-history.png":::
8383

@@ -94,4 +94,4 @@ Deleting your web app does not delete your Cosmos DB instance automatically. To
9494

9595
## Next steps
9696
* [Prompt engineering](../concepts/prompt-engineering.md)
97-
* [Azure openAI on your data](../concepts/use-your-data.md)
97+
* [Azure OpenAI on your data](../concepts/use-your-data.md)

articles/ai-services/openai/includes/create-resource-portal.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,9 @@ As an option, you can add a private endpoint for access to your resource. Select
8989

9090
1. Confirm your configuration settings, and select **Create**.
9191

92-
The Azure portal displays a notification when the new resource is available.
92+
1. The Azure portal displays a notification when the new resource is available. Select **Go to resource**.
93+
94+
:::image type="content" source="../media/create-resource/create-resource-go-to-resource.png" alt-text="Screenshot showing the Go to resource button in the Azure portal.":::
9395

9496
## Deploy a model
9597

94.6 KB
Loading
248 KB
Loading

articles/ai-services/openai/toc.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ items:
159159
href: ../cognitive-services-virtual-networks.md?context=/azure/ai-services/openai/context/context
160160
- name: Encryption of data at rest
161161
href: encrypt-data-at-rest.md
162-
- name: Manage identity
162+
- name: Managed identity
163163
href: ./how-to/managed-identity.md
164164
- name: Use Azure OpenAI on your data securely
165165
href: ./how-to/use-your-data-securely.md

0 commit comments

Comments
 (0)