Skip to content

Commit 850f5d1

Browse files
committed
Merge branch 'main' of https://github.com/nick863/get-started-with-ai-agents into nirovins/add_index
2 parents d34dedd + 989411f commit 850f5d1

File tree

6 files changed

+39
-0
lines changed

6 files changed

+39
-0
lines changed

.devcontainer/devcontainer.json

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"name": "azureai-basic-python",
3+
"image": "mcr.microsoft.com/devcontainers/python:3.11-bullseye",
4+
"forwardPorts": [50505],
5+
"features": {
6+
"ghcr.io/azure/azure-dev/azd:latest": {}
7+
},
8+
"customizations": {
9+
"vscode": {
10+
"extensions": [
11+
"ms-azuretools.azure-dev",
12+
"ms-azuretools.vscode-bicep",
13+
"ms-python.python",
14+
"ms-toolsai.jupyter",
15+
"GitHub.vscode-github-actions"
16+
]
17+
}
18+
},
19+
"postCreateCommand": "python3 -m pip install -r requirements-dev.txt && python3 -m pip install -e src",
20+
"remoteUser": "vscode",
21+
"hostRequirements": {
22+
"memory": "8gb"
23+
}
24+
}

azure.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ pipeline:
4343
- USE_APPLICATION_INSIGHTS
4444
- USE_SEARCH_SERVICE
4545
- AZURE_AI_AGENT_NAME
46+
- AZURE_AI_AGENT_ID
4647
- AZURE_AI_AGENT_DEPLOYMENT_NAME
4748
- AZURE_AI_AGENT_DEPLOYMENT_SKU
4849
- AZURE_AI_AGENT_DEPLOYMENT_CAPACITY

infra/api.bicep

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ param aiSearchIndexName string
1515
param embeddingDeploymentDimensions string
1616
param searchServiceEndpoint string
1717
param agentName string
18+
param agentID string
1819

1920
resource apiIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2023-01-31' = {
2021
name: identityName
@@ -34,6 +35,10 @@ var env = [
3435
name: 'AZURE_AI_AGENT_NAME'
3536
value: agentName
3637
}
38+
{
39+
name: 'AZURE_AI_AGENT_ID'
40+
value: agentID
41+
}
3742
{
3843
name: 'AZURE_AI_AGENT_DEPLOYMENT_NAME'
3944
value: agentDeploymentName

infra/main.bicep

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,8 @@ param principalId string = ''
7777
param agentModelFormat string
7878
@description('Name of agent to deploy')
7979
param agentName string
80+
@description('ID of agent to deploy')
81+
param aiAgentID string = ''
8082
@description('Name of the chat model to deploy')
8183
param agentModelName string
8284
@description('Name of the model deployment')
@@ -134,6 +136,8 @@ var resourceToken = toLower(uniqueString(subscription().id, environmentName, loc
134136
var projectName = !empty(aiProjectName) ? aiProjectName : 'ai-project-${resourceToken}'
135137
var tags = { 'azd-env-name': environmentName }
136138

139+
var agentID = !empty(aiAgentID) ? aiAgentID : ''
140+
137141
var aiDeployments = [
138142
{
139143
name: agentDeploymentName
@@ -296,6 +300,7 @@ module api 'api.bicep' = {
296300
embeddingDeploymentName: embeddingDeploymentName
297301
embeddingDeploymentDimensions: embeddingDeploymentDimensions
298302
agentName: agentName
303+
agentID: agentID
299304
exists: apiAppExists
300305
}
301306
}
@@ -420,6 +425,7 @@ output AZURE_AI_SEARCH_INDEX_NAME string = aiSearchIndexName
420425
output AZURE_AI_SEARCH_ENDPOINT string = searchServiceEndpoint
421426
output AZURE_AI_EMBED_DIMENSIONS string = embeddingDeploymentDimensions
422427
output AZURE_AI_AGENT_NAME string = agentName
428+
output AZURE_AI_AGENT_ID string = agentID
423429

424430
// Outputs required by azd for ACA
425431
output AZURE_CONTAINER_ENVIRONMENT_NAME string = containerApps.outputs.environmentName

infra/main.parameters.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,9 @@
5353
"agentName": {
5454
"value": "${AZURE_AI_AGENT_NAME=agent-template-assistant}"
5555
},
56+
"aiAgentID": {
57+
"value": "${AZURE_AI_AGENT_ID}"
58+
},
5659
"agentDeploymentName": {
5760
"value": "${AZURE_AI_AGENT_MODEL_NAME=gpt-4o-mini}"
5861
},

scripts/write_env.sh

100644100755
File mode changed.

0 commit comments

Comments
 (0)