Skip to content

Commit d908a93

Browse files
Merge branch 'km-agentframework-v2' of https://github.com/microsoft/Conversation-Knowledge-Mining-Solution-Accelerator into km-agentframework-v2
2 parents 7a5223c + 94cf6e3 commit d908a93

File tree

9 files changed

+426
-75
lines changed

9 files changed

+426
-75
lines changed

azure.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,19 @@ hooks:
1818
run: |
1919
Write-Host "Web app URL: "
2020
Write-Host "$env:WEB_APP_URL" -ForegroundColor Cyan
21+
22+
Write-Host "`nRun the following command in the bash terminal to create agents:"
23+
Write-Host "bash ./infra/scripts/agent_scripts/run_create_agents_scripts.sh" -ForegroundColor Cyan
2124
shell: pwsh
2225
continueOnError: false
2326
interactive: true
2427
posix:
2528
run: |
2629
echo "Web app URL: "
2730
echo $WEB_APP_URL
31+
32+
echo "\nRun the following command in the bash terminal to create agents:"
33+
echo "bash ./infra/scripts/agent_scripts/run_create_agents_scripts.sh"
2834
shell: sh
2935
continueOnError: false
3036
interactive: true

documents/DeploymentGuide.md

Lines changed: 38 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -238,9 +238,45 @@ Once you've opened the project in [Codespaces](#github-codespaces), [Dev Contain
238238
-- This deployment will take *7-10 minutes* to provision the resources in your account and set up the solution with sample data.
239239
- If you encounter an error or timeout during deployment, changing the location may help, as there could be availability constraints for the resources.
240240
241-
5. Once the deployment has completed successfully, open the [Azure Portal](https://portal.azure.com/), go to the deployed resource group, find the App Service, and get the app URL from `Default domain`.
241+
5. Once the deployment has completed successfully, copy the bash command from terminal: (ex: `bash ./infra/scripts/agent_scripts/run_create_agents_scripts.sh`) for later use.
242242
243-
6. If you are done trying out the application, you can delete the resources by running `azd down`.
243+
> **Note**: If you are running this deployment in GitHub Codespaces or VS Code Dev Container or Visual Studio Code (WEB) skip to step 7.
244+
245+
6. Create and activate a virtual environment in bash terminal:
246+
247+
```shell
248+
python -m venv .venv
249+
```
250+
251+
```shell
252+
source .venv/Scripts/activate
253+
```
254+
255+
7. Login to Azure:
256+
257+
```shell
258+
az login
259+
```
260+
261+
Alternatively, login to Azure using a device code (recommended when using VS Code Web):
262+
263+
```shell
264+
az login --use-device-code
265+
```
266+
267+
8. Run the bash script from the output of the azd deployment. The script will look like the following:
268+
```Shell
269+
bash ./infra/scripts/agent_scripts/run_create_agents_scripts.sh
270+
```
271+
272+
If you don't have azd env then you need to pass parameters along with the command. Then the command will look like the following:
273+
```Shell
274+
bash ./infra/scripts/agent_scripts/run_create_agents_scripts.sh <project-endpoint> <solution-name> <gpt-model-name> <ai-foundry-resource-id> <api-app-name> <azure-ai-search-connection-name> <azure-ai-search-index> <resource-group>
275+
```
276+
277+
9. Once the script has run successfully, open the [Azure Portal](https://portal.azure.com/), go to the deployed resource group, find the App Service, and get the app URL from `Default domain`.
278+
279+
10. If you are done trying out the application, you can delete the resources by running `azd down`.
244280
> **Note:** If you deployed with `enableRedundancy=true` and Log Analytics workspace replication is enabled, you must first disable replication before running `azd down` else resource group delete will fail. Follow the steps in [Handling Log Analytics Workspace Deletion with Replication Enabled](./LogAnalyticsReplicationDisable.md), wait until replication returns `false`, then run `azd down`.
245281

246282
### 🛠️ Troubleshooting

documents/LocalDebuggingSetup.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,9 @@ If you don't have an existing environment, you must first deploy the Azure resou
7070
|-------------|-------|------|
7171
| `SOLUTION_NAME` | | Prefix used to uniquely identify resources in the deployment |
7272
| `RESOURCE_GROUP_NAME` | | Name of the Azure Resource Group |
73+
| `AGENT_NAME_CONVERSATION` | | Name of the conversation agent |
74+
| `AGENT_NAME_TITLE` | | Name of the title agent |
75+
| `API_APP_NAME` | | Name of the Azure App Service for the API |
7376
| `APP_ENV` | `dev` | Set APP_ENV in your .env file to control Azure authentication. Set the environment variable to dev to use Azure CLI credentials, or to prod to use Managed Identity for production. Ensure you're logged in via az login when using dev in local. |
7477
| `APPINSIGHTS_INSTRUMENTATIONKEY` | | Instrumentation Key for Azure Application Insights |
7578
| `APPLICATIONINSIGHTS_CONNECTION_STRING` | | Connection string for Application Insights |
@@ -80,6 +83,7 @@ If you don't have an existing environment, you must first deploy the Azure resou
8083
| `AZURE_AI_SEARCH_INDEX` | `call_transcripts_index` | Name of the Azure AI Search index |
8184
| `AZURE_AI_SEARCH_CONNECTION_NAME` | | Connection name for Azure AI Search |
8285
| `AZURE_AI_FOUNDRY_NAME` | | Name of the Azure AI Foundry resource |
86+
| `AZURE_AI_FOUNDRY_RESOURCE_ID` | | Resource ID of the Azure AI Foundry resource |
8387
| `AZURE_AI_SEARCH_NAME` | | Name of the Azure AI Search service |
8488
| `AZURE_EXISTING_AI_PROJECT_RESOURCE_ID` | | Resource ID of existing AI project (if using existing foundry project) |
8589
| `AZURE_COSMOSDB_ACCOUNT` | | Name of the Azure Cosmos DB account |

infra/main.bicep

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1544,6 +1544,10 @@ module webSiteBackend 'modules/web-sites.bicep' = {
15441544
name: 'appsettings'
15451545
properties: {
15461546
REACT_APP_LAYOUT_CONFIG: reactAppLayoutConfig
1547+
AGENT_NAME_CONVERSATION: ''
1548+
AGENT_NAME_TITLE: ''
1549+
API_APP_NAME: 'api-${solutionSuffix}'
1550+
AZURE_AI_FOUNDRY_RESOURCE_ID: !empty(existingAiFoundryAiProjectResourceId) ? existingAiFoundryAiProjectResourceId : aiFoundryAiServices.outputs.resourceId
15471551
AZURE_OPENAI_DEPLOYMENT_MODEL: gptModelName
15481552
AZURE_OPENAI_ENDPOINT: !empty(existingOpenAIEndpoint) ? existingOpenAIEndpoint : 'https://${aiFoundryAiServices.outputs.name}.openai.azure.com/'
15491553
AZURE_OPENAI_API_VERSION: azureOpenAIApiVersion
@@ -1741,3 +1745,15 @@ output API_APP_URL string = 'https://api-${solutionSuffix}.azurewebsites.net'
17411745

17421746
@description('Contains web application URL.')
17431747
output WEB_APP_URL string = 'https://app-${solutionSuffix}.azurewebsites.net'
1748+
1749+
@description('Contains API application name.')
1750+
output API_APP_NAME string = 'api-${solutionSuffix}'
1751+
1752+
@description('Contains AI Foundry resource ID.')
1753+
output AZURE_AI_FOUNDRY_RESOURCE_ID string = !empty(existingAiFoundryAiProjectResourceId) ? existingAiFoundryAiProjectResourceId : aiFoundryAiServices.outputs.resourceId
1754+
1755+
@description('Contains Conversation Agent name.')
1756+
output AGENT_NAME_CONVERSATION string = ''
1757+
1758+
@description('Contains Title Agent name.')
1759+
output AGENT_NAME_TITLE string = ''

0 commit comments

Comments
 (0)