Skip to content

Commit fa36005

Browse files
committed
Merge branch 'main' into main-azure-container-apps
2 parents a3057ff + 451994c commit fa36005

File tree

13 files changed

+370
-144
lines changed

13 files changed

+370
-144
lines changed

.github/ISSUE_TEMPLATE.md

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<!--
2+
IF SUFFICIENT INFORMATION IS NOT PROVIDED VIA THE FOLLOWING TEMPLATE THE ISSUE MIGHT BE CLOSED WITHOUT FURTHER CONSIDERATION OR INVESTIGATION
3+
-->
4+
> Please provide us with the following information:
5+
> ---------------------------------------------------------------
6+
7+
### This issue is for a: (mark with an `x`)
8+
```
9+
- [ ] bug report -> please search issues before submitting
10+
- [ ] feature request
11+
- [ ] documentation issue or request
12+
- [ ] regression (a behavior that used to work and stopped in a new release)
13+
```
14+
15+
### Minimal steps to reproduce
16+
>
17+
18+
### Any log messages given by the failure
19+
>
20+
21+
### Expected/desired behavior
22+
>
23+
24+
### OS and Version?
25+
> Windows 7, 8 or 10. Linux (which distribution). macOS (Yosemite? El Capitan? Sierra?)
26+
27+
### Versions
28+
>
29+
30+
### Mention any other details that might be useful
31+
32+
> ---------------------------------------------------------------
33+
> Thanks! We'll be in touch soon.
+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Validate AZD template
2+
on:
3+
push:
4+
branches: [main]
5+
paths:
6+
- 'infra/**'
7+
pull_request:
8+
branches: [main]
9+
paths:
10+
- 'infra/**'
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v4
18+
19+
- name: Run Microsoft Security DevOps Analysis
20+
uses: microsoft/security-devops-action@preview
21+
id: msdo
22+
continue-on-error: true
23+
with:
24+
tools: templateanalyzer
25+
26+
- name: Upload alerts to Security tab
27+
if: github.repository_owner == 'Azure-Samples'
28+
uses: github/codeql-action/upload-sarif@v2
29+
with:
30+
sarif_file: ${{ steps.msdo.outputs.sarifFile }}

.github/workflows/bicep-audit.yml

+18-10
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
name: Validate AZD template
1+
name: Validate bicep templates
22
on:
33
push:
44
branches:
55
- main
66
paths:
7-
- "infra/**"
7+
- "**/*.bicep"
88
pull_request:
99
branches:
1010
- main
1111
paths:
12-
- "infra/**"
12+
- "**/*.bicep"
1313
workflow_dispatch:
1414

1515
jobs:
@@ -21,15 +21,23 @@ jobs:
2121
- name: Checkout
2222
uses: actions/checkout@v4
2323

24-
- name: Run Microsoft Security DevOps Analysis
25-
uses: microsoft/security-devops-action@preview
26-
id: msdo
27-
continue-on-error: true
24+
- name: Run PSRule analysis
25+
uses: microsoft/ps-rule@v2.9.0
2826
with:
29-
tools: templateanalyzer
27+
modules: PSRule.Rules.Azure
28+
baseline: Azure.Pillar.Security
29+
inputPath: infra/*.test.bicep
30+
outputFormat: Sarif
31+
outputPath: reports/ps-rule-results.sarif
32+
summary: true
33+
continue-on-error: true
34+
35+
env:
36+
PSRULE_CONFIGURATION_AZURE_BICEP_FILE_EXPANSION: 'true'
37+
PSRULE_CONFIGURATION_AZURE_BICEP_FILE_EXPANSION_TIMEOUT: '30'
3038

31-
- name: Upload alerts to Security tab
39+
- name: Upload results to security tab
3240
uses: github/codeql-action/upload-sarif@v3
3341
if: github.repository_owner == 'Azure-Samples'
3442
with:
35-
sarif_file: ${{ steps.msdo.outputs.sarifFile }}
43+
sarif_file: reports/ps-rule-results.sarif

README.md

+187-130
Large diffs are not rendered by default.

contoso_chat/requirements.txt

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
azure-cosmos
2+
azure-identity==1.16.0
3+
azure-search-documents==11.4.0
4+
promptflow==1.11.0
5+
promptflow-tools==1.4.0
6+
promptflow[azure]==1.11.0
7+
python-dotenv==1.0.1

deployment/environment.yaml

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
$schema: https://azuremlschemas.azureedge.net/latest/environment.schema.json
2+
build:
3+
path: image_build_with_requirements
4+
dockerfile_path: Dockerfile
5+
# inference config is used to build a serving container for online deployments
6+
inference_config:
7+
liveness_route:
8+
path: /health
9+
port: 8080
10+
readiness_route:
11+
path: /health
12+
port: 8080
13+
scoring_route:
14+
path: /score
15+
port: 8080
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
FROM mcr.microsoft.com/azureml/promptflow/promptflow-runtime:latest
2+
COPY ./requirements.txt .
3+
RUN pip install -r requirements.txt
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
azure-cosmos
2+
azure-ai-ml
3+
azure-ai-resources
4+
azure-search-documents==11.4.0
5+
promptflow==1.11.0
6+
promptflow[azure]==1.11.0
7+
promptflow-tools==1.4.0
8+
azure-identity==1.16.0
9+
python-dotenv==1.0.1
10+
jsonlines
11+
promptflow.evals
12+
nbconvert

infra/ai.yaml

+8
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,14 @@ deployments:
99
sku:
1010
name: Standard
1111
capacity: 20
12+
- name: gpt-4
13+
model:
14+
format: OpenAI
15+
name: gpt-4
16+
version: "0613"
17+
sku:
18+
name: Standard
19+
capacity: 20
1220
- name: text-embedding-ada-002
1321
model:
1422
format: OpenAI

infra/core/ai/hub.bicep

+25-4
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ param publicNetworkAccess string = 'Enabled'
3333
param location string = resourceGroup().location
3434
param tags object = {}
3535

36-
resource hub 'Microsoft.MachineLearningServices/workspaces@2024-01-01-preview' = {
36+
// NN:TODO resource hub 'Microsoft.MachineLearningServices/workspaces@2024-01-01-preview' = {
37+
resource hub 'Microsoft.MachineLearningServices/workspaces@2024-04-01' = {
3738
name: name
3839
location: location
3940
tags: tags
@@ -57,17 +58,37 @@ resource hub 'Microsoft.MachineLearningServices/workspaces@2024-01-01-preview' =
5758
}
5859
v1LegacyMode: false
5960
publicNetworkAccess: publicNetworkAccess
61+
discoveryUrl: 'https://${location}.api.azureml.ms/discovery'
6062
}
6163

62-
resource openAiConnection 'connections' = {
63-
name: openAiConnectionName
64+
/* NN:TODO
65+
resource contentSafetyDefaultEndpoint 'endpoints' = {
66+
name: 'Azure.ContentSafety'
67+
properties: {
68+
name: 'Azure.ContentSafety'
69+
endpointType: 'Azure.ContentSafety'
70+
associatedResourceId: openAi.id
71+
}
72+
}
73+
*/
74+
75+
/*
76+
NN:TODO
77+
Connections are not in the GA Swagger - they are only in public preview of 2024-04-01-preview version
78+
That is what you specify with the workspace@ version for AML API version
79+
The ApiVersion specified in the metadata is for the Azure Cognitive Services version (that wraps the OpenAPI call)
80+
*/
81+
82+
resource openAiConnection 'connections@2024-04-01-preview' = { // NN:TODO Add @version to ensure resource is correctly versioned
83+
name: 'aoai-connection'
6484
properties: {
6585
category: 'AzureOpenAI'
6686
authType: 'ApiKey'
6787
isSharedToAll: true
6888
target: openAi.properties.endpoints['OpenAI Language Model Instance API']
6989
metadata: {
70-
ApiVersion: '2023-07-01-preview'
90+
//ApiVersion: '2023-07-01-preview'
91+
ApiVersion: '2024-02-01'
7192
ApiType: 'azure'
7293
ResourceId: openAi.id
7394
}

infra/main.test.bicep

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// This file is for doing static analysis and contains sensible defaults
2+
// for the bicep analyser to minimise false-positives and provide the best results.
3+
4+
// This file is not intended to be used as a runtime configuration file.
5+
6+
targetScope = 'subscription'
7+
8+
param environmentName string = 'testing'
9+
param location string = 'westus2'
10+
11+
module main 'main.bicep' = {
12+
name: 'main'
13+
params: {
14+
environmentName: environmentName
15+
location: location
16+
}
17+
}

ps-rule.yaml

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# YAML: Set the AZURE_BICEP_FILE_EXPANSION configuration option to enable expansion
2+
configuration:
3+
AZURE_BICEP_FILE_EXPANSION: true
4+
AZURE_DEPLOYMENT_NONSENSITIVE_PARAMETER_NAMES:
5+
- resourceToken

requirements.txt

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
azure-cosmos
2+
azure-ai-ml
3+
azure-ai-resources
4+
azure-search-documents==11.4.0
5+
promptflow-tools==1.4.0
6+
azure-identity==1.16.0
7+
python-dotenv==1.0.1
8+
jsonlines
9+
promptflow.evals
10+
nbconvert

0 commit comments

Comments
 (0)