You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| Azure AI Search || ✓ | Azure AI Search is an Azure resource that supports information retrieval over your vector and textual data stored in search indexes. |
55
55
| Azure Storage || ✓ | Azure Storage is a cloud storage solution for storing unstructured data like documents, images, videos, and application installers. |
56
-
| Azure Cosmos DB || ✓ | Azure Cosmos DB is a globally distributed, multi-model database service that offers low latency, high availability, and scalability across multiple geographical regions. |
56
+
| Azure Cosmos DB | ✓| ✓ | Azure Cosmos DB is a globally distributed, multi-model database service that offers low latency, high availability, and scalability across multiple geographical regions. |
57
57
| Azure OpenAI ||| Azure OpenAI is a service that provides access to OpenAI's models including the GPT-4o, GPT-4o mini, GPT-4, GPT-4 Turbo with Vision, GPT-3.5-Turbo, DALLE-3, and Embeddings model series with the security and enterprise capabilities of Azure. |
58
58
| Application Insights ||| Azure Application Insights is a service within Azure Monitor that enables developers and DevOps teams to automatically detect performance anomalies, diagnose issues, and gain deep insights into application usage and behavior through powerful telemetry and analytics tools. |
59
59
| API key ||| API Key connections handle authentication to your specified target on an individual basis. |
Copy file name to clipboardExpand all lines: articles/ai-foundry/how-to/data-add.md
+3-5Lines changed: 3 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ ms.custom:
9
9
- build-2024
10
10
- ignite-2024
11
11
ms.topic: how-to
12
-
ms.date: 02/11/2025
12
+
ms.date: 05/21/2025
13
13
ms.author: franksolomon
14
14
author: fbsolo-ms1
15
15
---
@@ -29,12 +29,10 @@ Data can help when you need these capabilities:
29
29
> -**Lineage:** For any given data, you can view which jobs or prompt flow pipelines consume the data.
30
30
> -**Ease-of-use:** An Azure AI Foundry data resembles web browser bookmarks (favorites). Instead of remembering long storage paths that *reference* your frequently-used data on Azure Storage, you can create a data *version* and then access that version of the asset with a friendly name.
31
31
32
-
## Prerequisites
33
32
34
-
To create and work with data, you need:
33
+
## Prerequisites
35
34
36
-
- An Azure subscription. If you don't have one, create a [free account](https://azure.microsoft.com/free/).
37
-
- An [Azure AI Foundry project](../how-to/create-projects.md).
* A model with reasoning capabilities model deployment. If you don't have one read [Add and configure Foundry Models](../../how-to/create-model-deployments.md) to add a reasoning model.
25
25
@@ -29,6 +29,21 @@ To complete this tutorial, you need:
29
29
30
30
First, create the client to consume the model. The following code uses an endpoint URL and key that are stored in environment variables.
> Verify that you have deployed the model to Azure AI Services resource with The Azure AI Model Inference API. `Deepseek-R1` is also available as standard deployments. However, those endpoints don't take the parameter `model` as explained in this tutorial. You can verify that by going to [Azure AI Foundry portal]() > Models + endpoints, and verify that the model is listed under the section **Azure AI Services**.
58
+
---
46
59
47
60
If you have configured the resource to with **Microsoft Entra ID** support, you can use the following code snippet to create a client.
48
61
62
+
# [OpenAI API](#tab/openai)
63
+
64
+
```python
65
+
import os
66
+
from openai import AzureOpenAI
67
+
from azure.identity import DefaultAzureCredential, get_bearer_token_provider
Response: <think>Okay, the user is asking how many languages exist in the world. I need to provide a clear and accurate answer...</think>As of now, it's estimated that there are about 7,000 languages spoken around the world. However, this number can vary as some languages become extinct and new ones develop. It's also important to note that the number of speakers can greatly vary between languages, with some having millions of speakers and others only a few hundred.
142
+
Response: As of now, it's estimated that there are about 7,000 languages spoken around the world. However, this number can vary as some languages become extinct and new ones develop. It's also important to note that the number of speakers can greatly vary between languages, with some having millions of speakers and others only a few hundred.
Response: <think>Okay, the user is asking how many languages exist in the world. I need to provide a clear and accurate answer...</think>As of now, it's estimated that there are about 7,000 languages spoken around the world. However, this number can vary as some languages become extinct and new ones develop. It's also important to note that the number of speakers can greatly vary between languages, with some having millions of speakers and others only a few hundred.
163
+
Model: deepseek-r1
164
+
Usage:
165
+
Prompt tokens: 11
166
+
Total tokens: 897
167
+
Completion tokens: 886
168
+
```
169
+
---
98
170
99
171
### Reasoning content
100
172
101
-
Some reasoning models, like DeepSeek-R1, generate completions and include the reasoning behind it. The reasoning associated with the completion is included in the response's content within the tags `<think>` and `</think>`. The model may select on which scenarios to generate reasoning content. You can extract the reasoning content from the response to understand the model's thought process as follows:
173
+
Some reasoning models, like DeepSeek-R1, generate completions and include the reasoning behind it.
174
+
175
+
# [OpenAI API](#tab/openai)
176
+
177
+
The reasoning associated with the completion is included in the field `reasoning_content`. The model may select on which scenearios to generate reasoning content.
Thinking: Okay, the user is asking how many languages exist in the world. I need to provide a clear and accurate answer...
185
+
```
186
+
187
+
# [Model Inference API (preview)](#tab/inference)
188
+
189
+
The reasoning associated with the completion is included in the response's content within the tags `<think>` and `</think>`. The model may select on which scenarios to generate reasoning content. You can extract the reasoning content from the response to understand the model's thought process as follows:
Thinking: Okay, the user is asking how many languages exist in the world. I need to provide a clear and accurate answer. Let's start by recalling the general consensus from linguistic sources. I remember that the number often cited is around 7,000, but maybe I should check some reputable organizations.\n\nEthnologue is a well-known resource for language data, and I think they list about 7,000 languages. But wait, do they update their numbers? It might be around 7,100 or so. Also, the exact count can vary because some sources might categorize dialects differently or have more recent data. \n\nAnother thing to consider is language endangerment. Many languages are endangered, with some having only a few speakers left. Organizations like UNESCO track endangered languages, so mentioning that adds context. Also, the distribution isn't even. Some countries have hundreds of languages, like Papua New Guinea with over 800, while others have just a few. \n\nA user might also wonder why the exact number is hard to pin down. It's because the distinction between a language and a dialect can be political or cultural. For example, Mandarin and Cantonese are considered dialects of Chinese by some, but they're mutually unintelligible, so others classify them as separate languages. Also, some regions are under-researched, making it hard to document all languages. \n\nI should also touch on language families. The 7,000 languages are grouped into families like Indo-European, Sino-Tibetan, Niger-Congo, etc. Maybe mention a few of the largest families. But wait, the question is just about the count, not the families. Still, it's good to provide a bit more context. \n\nI need to make sure the information is up-to-date. Let me think – recent estimates still hover around 7,000. However, languages are dying out rapidly, so the number decreases over time. Including that note about endangerment and language extinction rates could be helpful. For instance, it's often stated that a language dies every few weeks. \n\nAnother point is sign languages. Does the count include them? Ethnologue includes some, but not all sources might. If the user is including sign languages, that adds more to the count, but I think the 7,000 figure typically refers to spoken languages. For thoroughness, maybe mention that there are also over 300 sign languages. \n\nSummarizing, the answer should state around 7,000, mention Ethnologue's figure, explain why the exact number varies, touch on endangerment, and possibly note sign languages as a separate category. Also, a brief mention of Papua New Guinea as the most linguistically diverse country. \n\nWait, let me verify Ethnologue's current number. As of their latest edition (25th, 2022), they list 7,168 living languages. But I should check if that's the case. Some sources might round to 7,000. Also, SIL International publishes Ethnologue, so citing them as reference makes sense. \n\nOther sources, like Glottolog, might have a different count because they use different criteria. Glottolog might list around 7,000 as well, but exact numbers vary. It's important to highlight that the count isn't exact because of differing definitions and ongoing research. \n\nIn conclusion, the approximate number is 7,000, with Ethnologue being a key source, considerations of endangerment, and the challenges in counting due to dialect vs. language distinctions. I should make sure the answer is clear, acknowledges the variability, and provides key points succinctly.
123
-
124
-
Answer: The exact number of languages in the world is challenging to determine due to differences in definitions (e.g., distinguishing languages from dialects) and ongoing documentation efforts. However, widely cited estimates suggest there are approximately **7,000 languages** globally.
125
-
Model: DeepSeek-R1
126
-
Usage:
127
-
Prompt tokens: 11
128
-
Total tokens: 897
129
-
Completion tokens: 886
203
+
Thinking: Okay, the user is asking how many languages exist in the world. I need to provide a clear and accurate answer. Let's start...
130
204
```
205
+
---
131
206
132
207
When making multi-turn conversations, it's useful to avoid sending the reasoning content in the chat history as reasoning tends to generate long explanations.
133
208
@@ -139,6 +214,19 @@ You can _stream_ the content to get it as it's being generated. Streaming conten
139
214
140
215
To stream completions, set`stream=True` when you call the model.
141
216
217
+
# [OpenAI API](#tab/openai)
218
+
219
+
```python
220
+
response= client.chat.completions.create(
221
+
model="deepseek-r1",
222
+
messages=[
223
+
{"role": "user", "content": "How many languages are in the world?"}
224
+
],
225
+
stream=True
226
+
)
227
+
```
228
+
229
+
# [Model Inference API (preview)](#tab/inference)
142
230
143
231
```python
144
232
response= client.complete(
@@ -150,9 +238,38 @@ response = client.complete(
150
238
stream=True,
151
239
)
152
240
```
241
+
---
153
242
154
243
To visualize the output, define a helper function to print the stream. The following example implements a routing that stream only the answer without the reasoning content:
155
244
245
+
# [OpenAI API](#tab/openai)
246
+
247
+
Reasoning content is also included inside of the delta pieces of the response, in the key `reasoning_content`.
print(f"Your request triggered an {response['error']['code']} error:\n\t{response['error']['message']}")
335
+
else:
336
+
raise
337
+
raise
338
+
```
339
+
340
+
# [Model Inference API (preview)](#tab/inference)
341
+
199
342
```python
200
343
from azure.ai.inference.models import AssistantMessage, UserMessage
201
344
@@ -218,6 +361,7 @@ except HttpResponseError as ex:
218
361
raise
219
362
raise
220
363
```
364
+
---
221
365
222
366
> [!TIP]
223
367
> To learn more about how you can configure and control Azure AI Content Safety settings, check the [Azure AI Content Safety documentation](https://aka.ms/azureaicontentsafety).
0 commit comments