Skip to content

Golden path updates: agent evals, fix initialization #105

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 8 commits into
base: howie/golden-path
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/azure-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
AZURE_AI_EMBED_MODEL_NAME: ${{ vars.AZURE_AI_EMBED_MODEL_NAME }}
AZURE_AI_EMBED_MODEL_FORMAT: ${{ vars.AZURE_AI_EMBED_MODEL_FORMAT }}
AZURE_AI_EMBED_MODEL_VERSION: ${{ vars.AZURE_AI_EMBED_MODEL_VERSION }}
AZURE_EXISTING_AIPROJECT_CONNECTION_STRING: ${{ vars.AZURE_EXISTING_AIPROJECT_CONNECTION_STRING }}
AZURE_EXISTING_AIPROJECT_RESOURCE_ID: ${{ vars.AZURE_EXISTING_AIPROJECT_RESOURCE_ID }}
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/template-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,6 @@ jobs:
AZURE_AI_EMBED_MODEL_NAME: ${{ vars.AZURE_AI_EMBED_MODEL_NAME }}
AZURE_AI_EMBED_MODEL_FORMAT: ${{ vars.AZURE_AI_EMBED_MODEL_FORMAT }}
AZURE_AI_EMBED_MODEL_VERSION: ${{ vars.AZURE_AI_EMBED_MODEL_VERSION }}
AZURE_EXISTING_AIPROJECT_CONNECTION_STRING: ${{ vars.AZURE_EXISTING_AIPROJECT_CONNECTION_STRING }}
AZURE_EXISTING_AIPROJECT_RESOURCE_ID: ${{ vars.AZURE_EXISTING_AIPROJECT_RESOURCE_ID }}
- name: print result
run: cat ${{ steps.validation.outputs.resultFile }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@ node_modules/

# React build output
src/api/static/react/
.vscode/launch.json
19 changes: 19 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Python Debugger: FastAPI",
"type": "debugpy",
"request": "launch",
"module": "uvicorn",
"cwd": "${workspaceFolder}/src",
"args": [
"api.main:create_app",
],
"jinja": true
}
]
}
4 changes: 2 additions & 2 deletions azure.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# TODO: do we need hooks?
# TODO: do we need all of the variables?

name: azd-get-started-with-ai-agents
name: azd-get-started-with-ai-agents-golden-path
metadata:
template: [email protected]

Expand Down Expand Up @@ -50,4 +50,4 @@ pipeline:
- AZURE_AI_EMBED_MODEL_VERSION
- AZURE_AI_EMBED_DIMENSIONS
- AZURE_AI_SEARCH_INDEX_NAME
- AZURE_EXISTING_AIPROJECT_CONNECTION_STRING
- AZURE_EXISTING_AIPROJECT_RESOURCE_ID
2 changes: 1 addition & 1 deletion docs/deploy_customization.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Once you disable these resources, they will not be deployed when you run `azd up
By default, this template will use a naming convention with unique strings to prevent naming collisions within Azure.
To override default naming conventions, the following keys can be set:

* `AZURE_EXISTING_AIPROJECT_CONNECTION_STRING` - An existing connection string to be use. If specified, resources for AI Foundry Hub, AI Foundry Project, and Azure AI service will not be created.
* `AZURE_EXISTING_AIPROJECT_RESOURCE_ID` - An existing AI Project Resource ID be used. If specified, resources for AI Foundry Project and Azure AI service will not be created.
* `AZURE_AIHUB_NAME` - The name of the AI Foundry Hub resource
* `AZURE_AIPROJECT_NAME` - The name of the AI Foundry Project
* `AZURE_AISERVICES_NAME` - The name of the Azure AI service
Expand Down
17 changes: 14 additions & 3 deletions infra/api.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ param tags object = {}

param identityName string
param containerAppsEnvironmentName string
param projectConnectionString string
param azureExistingAIProjectResourceId string
param agentDeploymentName string
param searchConnectionName string
param embeddingDeploymentName string
Expand All @@ -14,6 +14,8 @@ param searchServiceEndpoint string
param agentName string
param agentID string
param projectName string
param enableAzureMonitorTracing bool
param azureTracingGenAIContentRecordingEnabled bool

resource apiIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2023-01-31' = {
name: identityName
Expand All @@ -26,8 +28,8 @@ var env = [
value: apiIdentity.properties.clientId
}
{
name: 'AZURE_EXISTING_AIPROJECT_CONNECTION_STRING'
value: projectConnectionString
name: 'AZURE_EXISTING_AIPROJECT_RESOURCE_ID'
value: azureExistingAIProjectResourceId
}
{
name: 'AZURE_AI_AGENT_NAME'
Expand Down Expand Up @@ -65,6 +67,14 @@ var env = [
name: 'AZURE_AI_SEARCH_ENDPOINT'
value: searchServiceEndpoint
}
{
name: 'ENABLE_AZURE_MONITOR_TRACING'
value: enableAzureMonitorTracing
}
{
name: 'AZURE_TRACING_GEN_AI_CONTENT_RECORDING_ENABLED'
value: azureTracingGenAIContentRecordingEnabled
}
]


Expand All @@ -82,6 +92,7 @@ module app 'core/host/container-app-upsert.bicep' = {
}
}


output SERVICE_API_IDENTITY_PRINCIPAL_ID string = apiIdentity.properties.principalId
output SERVICE_API_NAME string = app.outputs.name
output SERVICE_API_URI string = app.outputs.uri
64 changes: 53 additions & 11 deletions infra/core/ai/cognitiveservices.bicep
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
metadata description = 'Creates an Azure Cognitive Services instance.'
param name string
param aiServiceName string
param aiProjectName string
param location string = resourceGroup().location
param tags object = {}
@description('The custom subdomain name used to access the API. Defaults to the value of the name parameter.')
param customSubDomainName string = name
param customSubDomainName string = aiServiceName
param disableLocalAuth bool = false
param deployments array = []
param kind string = 'OpenAI'
//param kind string = 'AIServices'
param appInsightsId string
param appInsightConnectionString string
param appInsightConnectionName string

@allowed([ 'Enabled', 'Disabled' ])
param publicNetworkAccess string = 'Enabled'
Expand All @@ -23,22 +25,59 @@ param networkAcls object = empty(allowedIpRules) ? {
defaultAction: 'Deny'
}

resource account 'Microsoft.CognitiveServices/accounts@2023-05-01' = {
name: name
resource account 'Microsoft.CognitiveServices/accounts@2025-04-01-preview' = {
name: aiServiceName
location: location
sku: sku
kind: 'AIServices'
identity: {
type: 'SystemAssigned'
}
tags: tags
kind: kind
properties: {
allowProjectManagement: true
customSubDomainName: customSubDomainName
publicNetworkAccess: publicNetworkAccess
networkAcls: networkAcls
disableLocalAuth: disableLocalAuth
publicNetworkAccess: publicNetworkAccess
disableLocalAuth: disableLocalAuth
}
}

// Creates the Azure Foundry connection to your Azure App Insights resource
resource appInsightConnection 'Microsoft.CognitiveServices/accounts/connections@2025-04-01-preview' = {
name: appInsightConnectionName
parent: account
properties: {
category: 'AppInsights'
target: appInsightsId
authType: 'ApiKey'
isSharedToAll: true
credentials: {
key: appInsightConnectionString
}
metadata: {
ApiType: 'Azure'
ResourceId: appInsightsId
}
}
}

resource aiProject 'Microsoft.CognitiveServices/accounts/projects@2025-04-01-preview' = {
parent: account
name: aiProjectName
location: location
tags: tags
identity: {
type: 'SystemAssigned'
}
properties: {
description: 'AI Project'
displayName: 'AI Project'
}
sku: sku
}

@batchSize(1)
resource deployment 'Microsoft.CognitiveServices/accounts/deployments@2023-05-01' = [for deployment in deployments: {
resource aiServicesDeployments 'Microsoft.CognitiveServices/accounts/deployments@2024-10-01' = [for deployment in deployments: {
parent: account
name: deployment.name
properties: {
Expand All @@ -51,7 +90,10 @@ resource deployment 'Microsoft.CognitiveServices/accounts/deployments@2023-05-01
}
}]



output endpoint string = account.properties.endpoint
output endpoints object = account.properties.endpoints
output id string = account.id
output name string = account.name
output projectResourceId string = aiProject.id
157 changes: 0 additions & 157 deletions infra/core/ai/hub-dependencies.bicep

This file was deleted.

Loading