Skip to content

Commit 34a6fe7

Browse files
authored
Merge pull request #260575 from MicrosoftDocs/main
12/7 11:00 AM IST Publish
2 parents d22983a + 12b4f66 commit 34a6fe7

File tree

60 files changed

+280
-120
lines changed

Some content is hidden

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

60 files changed

+280
-120
lines changed

articles/ai-services/openai/how-to/json-mode.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ $messages += @{
9090
}
9191
$messages += @{
9292
role = 'user'
93-
content = 'Who through the final pitch during the world series each year from 1979 to 1989?'
93+
content = 'Who threw the final pitch during the world series each year from 1979 to 1989?'
9494
}
9595
$messages += @{
9696
role = 'user'
@@ -155,4 +155,4 @@ BadRequestError: Error code: 400 - {'error': {'message': "'messages' must contai
155155
You should check `finish_reason` for the value `length` before parsing the response. The model might generate partial JSON. This means that output from the model was larger than the available max_tokens that were set as part of the request, or the conversation itself exceeded the token limit.
156156

157157
JSON mode produces JSON that is valid and parses without error. However, there's no guarantee for
158-
output to match a specific schema, even if requested in the prompt.
158+
output to match a specific schema, even if requested in the prompt.

articles/ai-services/openai/how-to/reproducible-output.md

Lines changed: 89 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ Reproducible output is only currently supported with the following:
2424

2525
### Supported models
2626

27-
- `gpt-4-1106-preview`
28-
- `gpt-35-turbo-1106`
27+
- `gpt-4-1106-preview` ([region availability](../concepts/models.md#gpt-4-and-gpt-4-turbo-preview-model-availability))
28+
- `gpt-35-turbo-1106` ([region availability)](../concepts/models.md#gpt-35-turbo-model-availability))
2929

3030
### API Version
3131

@@ -35,6 +35,8 @@ Reproducible output is only currently supported with the following:
3535

3636
First we'll generate three responses to the same question to demonstrate the variability that is common to Chat Completion responses even when other parameters are the same:
3737

38+
# [Python](#tab/pyton)
39+
3840
```python
3941
import os
4042
from openai import AzureOpenAI
@@ -65,6 +67,47 @@ for i in range(3):
6567
del response
6668
```
6769

70+
# [PowerShell](#tab/powershell)
71+
72+
```powershell-interactive
73+
$openai = @{
74+
api_key = $Env:AZURE_OPENAI_KEY
75+
api_base = $Env:AZURE_OPENAI_ENDPOINT # like the following https://YOUR_RESOURCE_NAME.openai.azure.com/
76+
api_version = '2023-12-01-preview' # may change in the future
77+
name = 'YOUR-DEPLOYMENT-NAME-HERE' # name you chose for your deployment
78+
}
79+
80+
$headers = @{
81+
'api-key' = $openai.api_key
82+
}
83+
84+
$messages = @()
85+
$messages += @{
86+
role = 'system'
87+
content = 'You are a helpful assistant.'
88+
}
89+
$messages += @{
90+
role = 'user'
91+
content = 'Tell me a story about how the universe began?'
92+
}
93+
94+
$body = @{
95+
#seed = 42
96+
temperature = 0.7
97+
max_tokens = 200
98+
messages = $messages
99+
} | ConvertTo-Json
100+
101+
$url = "$($openai.api_base)/openai/deployments/$($openai.name)/chat/completions?api-version=$($openai.api_version)"
102+
103+
for ($i=0; $i -le 2; $i++) {
104+
$response = Invoke-RestMethod -Uri $url -Headers $headers -Body $body -Method Post -ContentType 'application/json'
105+
write-host "Story Version $($i+1)`n---`n$($response.choices[0].message.content)`n---`n"
106+
}
107+
```
108+
109+
---
110+
68111
### Output
69112

70113
```output
@@ -104,6 +147,8 @@ Notice that while each story might have similar elements and some verbatim repet
104147

105148
Now we'll run the same code as before but this time uncomment the line for the parameter that says `seed=42`
106149

150+
# [Python](#tab/pyton)
151+
107152
```python
108153
import os
109154
from openai import AzureOpenAI
@@ -134,6 +179,47 @@ for i in range(3):
134179
del response
135180
```
136181

182+
# [PowerShell](#tab/powershell)
183+
184+
```powershell-interactive
185+
$openai = @{
186+
api_key = $Env:AZURE_OPENAI_KEY
187+
api_base = $Env:AZURE_OPENAI_ENDPOINT # like the following https://YOUR_RESOURCE_NAME.openai.azure.com/
188+
api_version = '2023-12-01-preview' # may change in the future
189+
name = 'YOUR-DEPLOYMENT-NAME-HERE' # name you chose for your deployment
190+
}
191+
192+
$headers = @{
193+
'api-key' = $openai.api_key
194+
}
195+
196+
$messages = @()
197+
$messages += @{
198+
role = 'system'
199+
content = 'You are a helpful assistant.'
200+
}
201+
$messages += @{
202+
role = 'user'
203+
content = 'Tell me a story about how the universe began?'
204+
}
205+
206+
$body = @{
207+
seed = 42
208+
temperature = 0.7
209+
max_tokens = 200
210+
messages = $messages
211+
} | ConvertTo-Json
212+
213+
$url = "$($openai.api_base)/openai/deployments/$($openai.name)/chat/completions?api-version=$($openai.api_version)"
214+
215+
for ($i=0; $i -le 2; $i++) {
216+
$response = Invoke-RestMethod -Uri $url -Headers $headers -Body $body -Method Post -ContentType 'application/json'
217+
write-host "Story Version $($i+1)`n---`n$($response.choices[0].message.content)`n---`n"
218+
}
219+
```
220+
221+
---
222+
137223
### Output
138224

139225
```
@@ -179,7 +265,7 @@ This fingerprint represents the backend configuration that the model runs with.
179265

180266
It can be used with the seed request parameter to understand when backend changes have been made that might affect determinism.
181267

182-
To view the full chat completion object with `system_fingerprint`, you could add ` print(response.model_dump_json(indent=2))` to the previous code next to the existing print statement. This change results in the following additional information being part of the output:
268+
To view the full chat completion object with `system_fingerprint`, you could add ` print(response.model_dump_json(indent=2))` to the previous Python code next to the existing print statement, or `$response | convertto-json -depth 5` at the end of the PowerShell example. This change results in the following additional information being part of the output:
183269

184270
### Output
185271

articles/ai-services/openai/includes/embeddings-powershell.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ param(
143143
[string]$content
144144
)
145145
# tab, line breaks, empty space
146-
$replace = @('\t','\r\n','\n','\r',' ')
146+
$replace = @('\t','\r\n','\n','\r')
147147
# non-UTF8 characters
148148
$replace += @('[^\x00-\x7F]')
149149
# html
@@ -157,7 +157,7 @@ param(
157157
# markdown
158158
$replace += @('###','##','#','```')
159159
$replace | ForEach-Object {
160-
$content = $content -replace $_, ' '
160+
$content = $content -replace $_, ' ' -replace ' ',' '
161161
}
162162
return $content
163163
}
@@ -413,4 +413,4 @@ the entire datatable). As a learning exercise, try creating a PowerShell script
413413
[09]: ../concepts/understand-embeddings.md#cosine-similarity
414414
[10]: /azure/search/vector-search-overview
415415
[11]: https://platform.openai.com/docs/guides/rate-limits/error-mitigation
416-
[12]: https://www.powershellgallery.com/packages/Measure-VectorSimilarity/
416+
[12]: https://www.powershellgallery.com/packages/Measure-VectorSimilarity/

articles/ai-studio/toc.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -187,10 +187,6 @@
187187
items:
188188
- name: Azure AI SDK for Python
189189
href: /python/api/overview/azure/ai
190-
- name: Azure CLI
191-
href: /cli/azure/cognitiveservices
192-
- name: Azure PowerShell
193-
href: /powershell/module/azurerm.cognitiveservices/
194190
- name: Azure Policy built-ins
195191
displayName: samples, policies, definitions
196192
href: ../ai-services/policy-reference.md?context=/azure/ai-studio/context/context

articles/aks/trusted-access-feature.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Learn how to use the Trusted Access feature to enable Azure resourc
44
author: schaffererin
55
ms.topic: article
66
ms.custom: devx-track-azurecli
7-
ms.date: 05/23/2023
7+
ms.date: 12/04/2023
88
ms.author: schaffererin
99
---
1010

@@ -26,6 +26,9 @@ This article shows you how to enable secure access from your Azure services to y
2626

2727
[!INCLUDE [preview features callout](./includes/preview/preview-callout.md)]
2828

29+
> [!NOTE]
30+
> The Trusted Access API is GA. We provide GA support for CLI, however it's still in preview and requires the `aks-preview` extension.
31+
2932
## Trusted Access feature overview
3033

3134
Trusted Access enables you to give explicit consent to your system-assigned MSI of allowed resources to access your AKS clusters using an Azure resource *RoleBinding*. Your Azure resources access AKS clusters through the AKS regional gateway via system-assigned managed identity authentication with the appropriate Kubernetes permissions via an Azure resource *Role*. The Trusted Access feature allows you to access AKS clusters with different configurations, including but not limited to [private clusters](private-clusters.md), [clusters with local accounts disabled](manage-local-accounts-managed-azure-ad.md#disable-local-accounts), [Microsoft Entra ID clusters](azure-ad-integration-cli.md), and [authorized IP range clusters](api-server-authorized-ip-ranges.md).

articles/aks/upgrade-aks-cluster.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,9 @@ To stagger a node upgrade in a controlled manner and minimize application downti
289289
...
290290
default 2m1s Normal Drain node/aks-nodepool1-96663640-vmss000001 Draining node: [aks-nodepool1-96663640-vmss000001]
291291
...
292-
default 9m22s Normal Surge node/aks-nodepool1-96663640-vmss000002 Created a surge node [aks-nodepool1-96663640-vmss000002 nodepool1] for agentpool %!s(MISSING)
292+
default 1m45s Normal Upgrade node/aks-nodepool1-96663640-vmss000001 Soak duration 5m0s after draining node: aks-nodepool1-96663640-vmss000001
293+
...
294+
default 9m22s Normal Surge node/aks-nodepool1-96663640-vmss000002 Created a surge node [aks-nodepool1-96663640-vmss000002 nodepool1] for agentpool nodepool1
293295
...
294296
```
295297

articles/azure-monitor/agents/log-analytics-agent.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ ms.reviewer: luki
1414
This article provides a detailed overview of the Log Analytics agent and the agent's system and network requirements and deployment methods.
1515

1616
>[!IMPORTANT]
17-
>The Log Analytics agent is on a **deprecation path** and won't be supported after **August 31, 2024**. If you use the Log Analytics agent to ingest data to Azure Monitor, [migrate to the new Azure Monitor agent](./azure-monitor-agent-migration.md) prior to that date.
17+
>The Log Analytics agent is on a **deprecation path** and won't be supported after **August 31, 2024**. Any new data centers brought online after January 1 2024 will not support the Log Analytics agent. If you use the Log Analytics agent to ingest data to Azure Monitor, [migrate to the new Azure Monitor agent](./azure-monitor-agent-migration.md) prior to that date.
1818
1919
You might also see the Log Analytics agent referred to as Microsoft Monitoring Agent (MMA).
2020

articles/azure-monitor/containers/container-insights-metric-alerts.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ ms.reviewer: aul
1111
Metric alerts in Azure Monitor proactively identify issues related to system resources of your Azure resources, including monitored Kubernetes clusters. Container insights provides preconfigured alert rules so that you don't have to create your own. This article describes the different types of alert rules you can create and how to enable and configure them.
1212

1313
> [!IMPORTANT]
14-
> Container insights in Azure Monitor now supports alerts based on Prometheus metrics, and metric rules will be retired on March 14, 2026. If you already use alerts based on custom metrics, you should migrate to Prometheus alerts and disable the equivalent custom metric alerts. As of August 15, 2023, you will no longer be able to configure new custom metric recommended alerts using the portal.
14+
> Azure Monitor now supports alerts based on Prometheus metrics, and metric rules in Container insights will be retired on May 31, 2024 (this was previously announced as March 14, 2026). If you already use alerts based on custom metrics, you should migrate to Prometheus alerts and disable the equivalent custom metric alerts. As of August 15, 2023, you are no longer be able to configure new custom metric recommended alerts using the portal.
15+
1516
## Types of metric alert rules
1617

1718
There are two types of metric rules used by Container insights based on either Prometheus metrics or custom metrics. See a list of the specific alert rules for each at [Alert rule details](#alert-rule-details).
@@ -50,6 +51,7 @@ The methods currently available for creating Prometheus alert rules are Azure Re
5051
1. To deploy community and recommended alerts, follow this [template](https://aka.ms/azureprometheus-alerts-bicep) and follow the README.md file in the same folder for how to deploy.
5152

5253

54+
5355
---
5456

5557
### Edit Prometheus alert rules
@@ -104,6 +106,7 @@ The configuration change can take a few minutes to finish before it takes effect
104106
105107
> [!IMPORTANT]
106108
> Metric alerts (preview) are retiring and no longer recommended. As of August 15, 2023, you will no longer be able to configure new custom metric recommended alerts using the portal. Please refer to the migration guidance at [Migrate from Container insights recommended alerts to Prometheus recommended alert rules (preview)](#migrate-from-metric-rules-to-prometheus-rules-preview).
109+
107110
### Prerequisites
108111
109112
- You might need to enable collection of custom metrics for your cluster. See [Metrics collected by Container insights](container-insights-custom-metrics.md).
@@ -158,6 +161,8 @@ To disable custom alert rules, use the same ARM template to create the rule, but
158161
159162
160163
164+
165+
161166
## Migrate from metric rules to Prometheus rules (preview)
162167
If you're using metric alert rules to monitor your Kubernetes cluster, you should transition to Prometheus recommended alert rules (preview) before March 14, 2026 when metric alerts are retired.
163168

articles/azure-resource-manager/bicep/outputs.md

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Outputs in Bicep
33
description: Describes how to define output values in Bicep
44
ms.topic: conceptual
55
ms.custom: devx-track-bicep
6-
ms.date: 09/28/2022
6+
ms.date: 12/06/2023
77
---
88

99
# Outputs in Bicep
@@ -15,10 +15,10 @@ This article describes how to define output values in a Bicep file. You use outp
1515
The syntax for defining an output value is:
1616

1717
```bicep
18-
output <name> <data-type> = <value>
18+
output <name> <data-type or type-expression> = <value>
1919
```
2020

21-
An output can have the same name as a parameter, variable, module, or resource. Each output value must resolve to one of the [data types](data-types.md).
21+
An output can have the same name as a parameter, variable, module, or resource. Each output value must resolve to one of the [data types](data-types.md), or [user-defined data type expression](./user-defined-data-types.md).
2222

2323
The following example shows how to return a property from a deployed resource. In the example, `publicIP` is the symbolic name for a public IP address that is deployed in the Bicep file. The output value gets the fully qualified domain name for the public IP address.
2424

@@ -40,6 +40,16 @@ var user = {
4040
output stringOutput string = user['user-name']
4141
```
4242

43+
The following example shows how to use type expression:
44+
45+
```bicep
46+
param foo 'a' | 'b' = 'a'
47+
48+
output out 'a' | 'b' = foo
49+
```
50+
51+
For more information, see [User-defined data types](./user-defined-data-types.md).
52+
4353
## Conditional output
4454

4555
When the value to return depends on a condition in the deployment, use the `?` operator.

articles/azure-resource-manager/bicep/parameters.md

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Parameters in Bicep files
33
description: Describes how to define parameters in a Bicep file.
44
ms.topic: conceptual
55
ms.custom: devx-track-bicep
6-
ms.date: 10/12/2023
6+
ms.date: 12/06/2023
77
---
88

99
# Parameters in Bicep
@@ -14,7 +14,7 @@ Resource Manager resolves parameter values before starting the deployment operat
1414

1515
Each parameter must be set to one of the [data types](data-types.md).
1616

17-
You are limited to 256 parameters in a Bicep file. For more information, see [Template limits](../templates/best-practices.md#template-limits).
17+
You're limited to 256 parameters in a Bicep file. For more information, see [Template limits](../templates/best-practices.md#template-limits).
1818

1919
For parameter best practices, see [Parameters](./best-practices.md#parameters).
2020

@@ -50,6 +50,17 @@ param <parameter-name> = <value>
5050

5151
For more information, see [Parameters file](./parameter-files.md).
5252

53+
User-defined type expressions can be used as the type clause of a `param` statement. For example:
54+
55+
```bicep
56+
param storageAccountConfig {
57+
name: string
58+
sku: string
59+
}
60+
```
61+
62+
For more information, see [User-defined data types](./user-defined-data-types.md#user-defined-data-type-syntax).
63+
5364
## Default value
5465

5566
You can specify a default value for a parameter. The default value is used when a value isn't provided during deployment.
@@ -184,7 +195,7 @@ When you hover your cursor over **storageAccountName** in VS Code, you see the f
184195

185196
:::image type="content" source="./media/parameters/vscode-bicep-extension-description-decorator-markdown.png" alt-text="Use Markdown-formatted text in VSCode":::
186197

187-
Make sure the text is well-formatted Markdown. Otherwise the text won't be rendered correctly.
198+
Make sure the text follows proper Markdown formatting; otherwise, it may not display correctly when rendered
188199

189200
### Metadata
190201

@@ -201,7 +212,7 @@ You might use this decorator to track information about the parameter that doesn
201212
param settings object
202213
```
203214

204-
When you provide a `@metadata()` decorator with a property that conflicts with another decorator, that decorator always takes precedence over anything in the `@metadata()` decorator. Consequently, the conflicting property within the @metadata() value is redundant and will be replaced. For more information, see [No conflicting metadata](./linter-rule-no-conflicting-metadata.md).
215+
When you provide a `@metadata()` decorator with a property that conflicts with another decorator, that decorator always takes precedence over anything in the `@metadata()` decorator. So, the conflicting property within the @metadata() value is redundant and will be replaced. For more information, see [No conflicting metadata](./linter-rule-no-conflicting-metadata.md).
205216

206217
## Use parameter
207218

0 commit comments

Comments
 (0)