Skip to content
Merged
Show file tree
Hide file tree
Changes from 19 commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
6d9f894
Added .dockerignore file to exclude unnecessary files from Docker bui…
Prasanjeet-Microsoft May 7, 2025
b4ba302
fixed date time response issue (#542)
AjitPadhi-Microsoft May 14, 2025
03417fe
Update main.bicepparam
Abdul-Microsoft May 19, 2025
bee82e8
Merge branch 'main' into dev
May 19, 2025
43a464b
Update src/App/backend/chat_logic_handler.py
Roopan-Microsoft May 21, 2025
cb49449
Update src/.dockerignore
Roopan-Microsoft May 21, 2025
72eb23a
feat: added opentelemetry log (#545)
Priyanka-Microsoft May 21, 2025
6d0f493
Merge branch 'main' into dev
Harsh-Microsoft May 27, 2025
58a3f42
Update main.json
Harsh-Microsoft May 27, 2025
99738aa
fix: Replace Gunicorn with Uvicorn for the backend server (#555)
Harsh-Microsoft May 29, 2025
2cc84de
EXP environment changes for Log Analytics workspace
Vamshi-Microsoft May 30, 2025
b88f111
refactor: Cleanup the unused variables in all the files (#557)
Abdul-Microsoft Jun 2, 2025
3053ffc
Merge branch 'dev' into exp-changes
Vamshi-Microsoft Jun 3, 2025
d15c956
Merge pull request #558 from microsoft/exp-changes
Prajwal-Microsoft Jun 3, 2025
7ae9718
EXP environment changes for Existing Fabric workspace
Vamshi-Microsoft Jun 3, 2025
17f48fa
Updated Heading
Vamshi-Microsoft Jun 3, 2025
afe869f
Merge pull request #559 from microsoft/exp-changes-fabric
Prajwal-Microsoft Jun 3, 2025
562533d
To reuse Log Analytics across subscriptions
Vamshi-Microsoft Jun 4, 2025
e6cbb5a
Merge pull request #560 from microsoft/exp-changes-sub
Vamshi-Microsoft Jun 5, 2025
1a996f1
automate
Vemarthula-Microsoft Jun 6, 2025
67d857c
Update test_automation.yml
Vemarthula-Microsoft Jun 6, 2025
8f99693
Update test_automation.yml
Vemarthula-Microsoft Jun 6, 2025
df678b6
Merge branch 'main' into dev
Roopan-Microsoft Jun 6, 2025
f80c49a
Update test_automation.yml
Vemarthula-Microsoft Jun 6, 2025
ea64dd1
Update test_automation.yml
Vemarthula-Microsoft Jun 6, 2025
2f5a18e
test: Migrate test automation scripts, pipeline for Client advisor
Avijit-Microsoft Jun 6, 2025
23d4e64
feat: Standardize Bicep Parameters for Client Advisor (#563)
VishalS-Microsoft Jun 6, 2025
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
9 changes: 0 additions & 9 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,6 @@ updates:
target-branch: "dependabotchanges"
open-pull-requests-limit: 100

- package-ecosystem: "pip"
directory: "/src/AzureFunction"
schedule:
interval: "monthly"
commit-message:
prefix: "build"
target-branch: "dependabotchanges"
open-pull-requests-limit: 100

- package-ecosystem: "pip"
directory: "/src/infra/scripts/fabric_scripts"
schedule:
Expand Down
5 changes: 5 additions & 0 deletions docs/CustomizingAzdParameters.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,9 @@ Change the Embedding Deployment Capacity (choose a number based on available emb

```shell
azd env set AZURE_ENV_EMBEDDING_MODEL_CAPACITY 80
```

Set the Log Analytics Workspace Id if you need to reuse the existing workspace which is already existing
```shell
azd env set AZURE_ENV_LOG_ANALYTICS_WORKSPACE_ID '/subscriptions/<subscription-id>/resourceGroups/<resource-group>/providers/Microsoft.OperationalInsights/workspaces/<workspace-name>'
```
2 changes: 2 additions & 0 deletions docs/DeploymentGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,8 @@ When you start the deployment, most parameters will have **default values**, but
| **GPT Model Deployment Capacity** | Configure capacity for **GPT models**. | 30k |
| **Embedding Model** | OpenAI embedding model | text-embedding-ada-002 |
| **Embedding Model Capacity** | Set the capacity for **embedding models**. | 80k |
| **Existing Log analytics workspace** | To reuse the existing Log analytics workspace Id. | |


</details>

Expand Down
7 changes: 5 additions & 2 deletions docs/FabricDeployment.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
## Fabric Deployment
## Step 1: Create Fabric workspace
## Step 1: Create or Use an Existing Microsoft Fabric Workspace

ℹ️ Note: If you already have an existing Microsoft Fabric Workspace, you can **skip this step** and proceed to Step 2. To retrieve an existing Workspace ID, check **Point 5 below**.

1. Navigate to ([Fabric Workspace](https://app.fabric.microsoft.com/))
2. Click on Workspaces from left Navigation
3. Click on + New Workspace
Expand All @@ -19,7 +22,7 @@
- ```cd ./Build-your-own-copilot-Solution-Accelerator/infra/scripts/fabric_scripts```
- ```sh ./run_fabric_items_scripts.sh keyvault_param workspaceid_param solutionprefix_param```
1. keyvault_param - the name of the keyvault that was created in Step 1
2. workspaceid_param - the workspaceid created in Step 2
2. workspaceid_param - Existing Workspaceid or workspaceid created in Step 2
3. solutionprefix_param - prefix used to append to lakehouse upon creation
4. Get Fabric Lakehouse connection details:
5. Once deployment is complete, navigate to Fabric Workspace
Expand Down
8 changes: 5 additions & 3 deletions docs/LocalSetupAndDeploy.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,11 @@ Follow these steps to deploy the application to Azure App Service:
If this is your first time deploying the app, use the `az webapp up` command. Run the following commands from the `App` folder, replacing the placeholders with your desired values:

```sh
az webapp up --runtime PYTHON:3.11 --sku B1 --name <new-app-name> --resource-group <resource-group-name> --location <azure-region> --subscription <subscription-name>
az webapp up --runtime PYTHON:3.11 --sku B1 --name <new-app-name> --resource-group <resource-group-name> --location <azure-region> --subscription <subscription-id>

az webapp config set --startup-file "python3 -m gunicorn app:app" --name <new-app-name> --resource-group <resource-group-name>
az webapp config set --startup-file "python3 -m uvicorn app:app --host 0.0.0.0 --port 8000" --name <new-app-name> --resource-group <resource-group-name>

az webapp config appsettings set --resource-group <resource-group-name> --name <new-app-name> --settings WEBSITES_PORT=8000
```

Next, configure the required environment variables in the deployed app to ensure it functions correctly.
Expand Down Expand Up @@ -83,7 +85,7 @@ az webapp up \
--resource-group <resource-group-name>

az webapp config set \
--startup-file "python3 -m gunicorn app:app" \
--startup-file "python3 -m uvicorn app:app --host 0.0.0.0 --port 8000" \
--name <existing-app-name> --resource-group <resource-group-name>
```

Expand Down
22 changes: 19 additions & 3 deletions infra/deploy_ai_foundry.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ param gptDeploymentCapacity int
param embeddingModel string
param embeddingDeploymentCapacity int
param managedIdentityObjectId string
param existingLogAnalyticsWorkspaceId string = ''

// Load the abbrevations file required to name the azure resources.
var abbrs = loadJsonContent('./abbreviations.json')
Expand Down Expand Up @@ -54,7 +55,17 @@ resource keyVault 'Microsoft.KeyVault/vaults@2022-07-01' existing = {
name: keyVaultName
}

resource logAnalytics 'Microsoft.OperationalInsights/workspaces@2023-09-01' = {
var useExisting = !empty(existingLogAnalyticsWorkspaceId)
var existingLawSubscription = useExisting ? split(existingLogAnalyticsWorkspaceId, '/')[2] : ''
var existingLawResourceGroup = useExisting ? split(existingLogAnalyticsWorkspaceId, '/')[4] : ''
var existingLawName = useExisting ? split(existingLogAnalyticsWorkspaceId, '/')[8] : ''

resource existingLogAnalyticsWorkspace 'Microsoft.OperationalInsights/workspaces@2023-09-01' existing = if (useExisting) {
name: existingLawName
scope: resourceGroup(existingLawSubscription, existingLawResourceGroup)
}

resource logAnalytics 'Microsoft.OperationalInsights/workspaces@2023-09-01' = if (!useExisting) {
name: workspaceName
location: location
tags: {}
Expand Down Expand Up @@ -93,7 +104,7 @@ resource applicationInsights 'Microsoft.Insights/components@2020-02-02' = {
Application_Type: 'web'
publicNetworkAccessForIngestion: 'Enabled'
publicNetworkAccessForQuery: 'Enabled'
WorkspaceResourceId: logAnalytics.id
WorkspaceResourceId: useExisting ? existingLogAnalyticsWorkspace.id : logAnalytics.id
}
}

Expand Down Expand Up @@ -490,5 +501,10 @@ output aiSearchService string = aiSearch.name
output aiProjectName string = aiHubProject.name

output applicationInsightsId string = applicationInsights.id
output logAnalyticsWorkspaceResourceName string = logAnalytics.name
output logAnalyticsWorkspaceResourceName string = useExisting ? existingLogAnalyticsWorkspace.name : logAnalytics.name
output logAnalyticsWorkspaceResourceGroup string = useExisting ? existingLawResourceGroup : resourceGroup().name


output storageAccountName string = storageNameCleaned
output applicationInsightsConnectionString string = applicationInsights.properties.ConnectionString

56 changes: 5 additions & 51 deletions infra/deploy_app_service.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,6 @@ param AzureSearchUseSemanticSearch string = 'False'
@description('Semantic search config')
param AzureSearchSemanticSearchConfig string = 'default'

@description('Is the index prechunked')
param AzureSearchIndexIsPrechunked string = 'False'

@description('Top K results')
param AzureSearchTopK string = '5'

Expand All @@ -59,9 +56,6 @@ param AzureOpenAIResource string
@description('Azure OpenAI Model Deployment Name')
param AzureOpenAIModel string

@description('Azure OpenAI Model Name')
param AzureOpenAIModelName string = 'gpt-4o-mini'

@description('Azure Open AI Endpoint')
param AzureOpenAIEndpoint string = ''

Expand Down Expand Up @@ -116,15 +110,9 @@ param AzureOpenAIEmbeddingkey string = ''
@description('Azure Open AI Embedding Endpoint')
param AzureOpenAIEmbeddingEndpoint string = ''

@description('Enable chat history by deploying a Cosmos DB instance')
param WebAppEnableChatHistory string = 'False'

@description('Use Azure Function')
param USE_INTERNAL_STREAM string = 'True'

@description('Azure Function Endpoint')
param STREAMING_AZUREFUNCTION_ENDPOINT string = ''

@description('SQL Database Server Name')
param SQLDB_SERVER string = ''

Expand Down Expand Up @@ -163,8 +151,6 @@ param userassignedIdentityId string
param userassignedIdentityClientId string
param applicationInsightsId string

@secure()
param azureSearchAdminKey string
param azureSearchServiceEndpoint string

@description('Azure Function App SQL System Prompt')
Expand All @@ -178,6 +164,7 @@ param streamTextSystemPrompt string
param aiProjectConnectionString string
param useAIProjectClientFlag string = 'false'
param aiProjectName string
param applicationInsightsConnectionString string

// var WebAppImageName = 'DOCKER|byoaiacontainer.azurecr.io/byoaia-app:latest'

Expand Down Expand Up @@ -215,6 +202,10 @@ resource Website 'Microsoft.Web/sites@2020-06-01' = {
name: 'APPINSIGHTS_INSTRUMENTATIONKEY'
value: reference(applicationInsightsId, '2015-05-01').InstrumentationKey
}
{
name: 'APPLICATIONINSIGHTS_CONNECTION_STRING'
value: applicationInsightsConnectionString
}
{
name: 'AZURE_SEARCH_SERVICE'
value: AzureSearchService
Expand All @@ -235,10 +226,6 @@ resource Website 'Microsoft.Web/sites@2020-06-01' = {
name: 'AZURE_SEARCH_SEMANTIC_SEARCH_CONFIG'
value: AzureSearchSemanticSearchConfig
}
{
name: 'AZURE_SEARCH_INDEX_IS_PRECHUNKED'
value: AzureSearchIndexIsPrechunked
}
{
name: 'AZURE_SEARCH_TOP_K'
value: AzureSearchTopK
Expand Down Expand Up @@ -279,10 +266,6 @@ resource Website 'Microsoft.Web/sites@2020-06-01' = {
name: 'AZURE_OPENAI_KEY'
value: AzureOpenAIKey
}
{
name: 'AZURE_OPENAI_MODEL_NAME'
value: AzureOpenAIModelName
}
{
name: 'AZURE_OPENAI_TEMPERATURE'
value: AzureOpenAITemperature
Expand Down Expand Up @@ -341,11 +324,6 @@ resource Website 'Microsoft.Web/sites@2020-06-01' = {
name: 'AZURE_OPENAI_EMBEDDING_ENDPOINT'
value: AzureOpenAIEmbeddingEndpoint
}

{
name: 'WEB_APP_ENABLE_CHAT_HISTORY'
value: WebAppEnableChatHistory
}

{name: 'SQLDB_SERVER'
value: SQLDB_SERVER
Expand All @@ -367,10 +345,6 @@ resource Website 'Microsoft.Web/sites@2020-06-01' = {
value: USE_INTERNAL_STREAM
}

{name: 'STREAMING_AZUREFUNCTION_ENDPOINT'
value: STREAMING_AZUREFUNCTION_ENDPOINT
}

{name: 'AZURE_COSMOSDB_ACCOUNT'
value: AZURE_COSMOSDB_ACCOUNT
}
Expand All @@ -386,30 +360,10 @@ resource Website 'Microsoft.Web/sites@2020-06-01' = {
//{name: 'VITE_POWERBI_EMBED_URL'
// value: VITE_POWERBI_EMBED_URL
//}
{
name: 'SCM_DO_BUILD_DURING_DEPLOYMENT'
value: 'true'
}
{
name: 'UWSGI_PROCESSES'
value: '2'
}
{
name: 'UWSGI_THREADS'
value: '2'
}
{
name: 'SQLDB_USER_MID'
value: userassignedIdentityClientId
}
{
name: 'OPENAI_API_VERSION'
value: AzureOpenAIApiVersion
}
{
name: 'AZURE_AI_SEARCH_API_KEY'
value: azureSearchAdminKey
}
{
name: 'AZURE_AI_SEARCH_ENDPOINT'
value: azureSearchServiceEndpoint
Expand Down
10 changes: 6 additions & 4 deletions infra/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ targetScope = 'resourceGroup'
@description('A unique prefix for all resources in this deployment. This should be 3-20 characters long:')
param environmentName string

@description('Optional: Existing Log Analytics Workspace Resource ID')
param existingLogAnalyticsWorkspaceId string = ''

@description('CosmosDB Location')
param cosmosLocation string

Expand Down Expand Up @@ -140,6 +143,7 @@ module aifoundry 'deploy_ai_foundry.bicep' = {
embeddingModel: embeddingModel
embeddingDeploymentCapacity: embeddingDeploymentCapacity
managedIdentityObjectId:managedIdentityModule.outputs.managedIdentityOutput.objectId
existingLogAnalyticsWorkspaceId: existingLogAnalyticsWorkspaceId
}
scope: resourceGroup(resourceGroup().name)
}
Expand Down Expand Up @@ -200,17 +204,15 @@ module appserviceModule 'deploy_app_service.bicep' = {
AzureSearchKey:keyVault.getSecret('AZURE-SEARCH-KEY')
AzureSearchUseSemanticSearch:'True'
AzureSearchSemanticSearchConfig:'my-semantic-config'
AzureSearchIndexIsPrechunked:'False'
AzureSearchTopK:'5'
AzureSearchContentColumns:'content'
AzureSearchFilenameColumn:'chunk_id'
AzureSearchTitleColumn:'client_id'
AzureSearchUrlColumn:'sourceurl'
AzureOpenAIResource:aifoundry.outputs.aiServicesTarget
AzureOpenAIResource:aifoundry.outputs.aiServicesName
AzureOpenAIEndpoint:aifoundry.outputs.aiServicesTarget
AzureOpenAIModel:gptModelName
AzureOpenAIKey:keyVault.getSecret('AZURE-OPENAI-KEY')
AzureOpenAIModelName:gptModelName
AzureOpenAITemperature:'0'
AzureOpenAITopP:'1'
AzureOpenAIMaxTokens:'1000'
Expand Down Expand Up @@ -239,13 +241,13 @@ module appserviceModule 'deploy_app_service.bicep' = {
userassignedIdentityClientId:managedIdentityModule.outputs.managedIdentityWebAppOutput.clientId
userassignedIdentityId:managedIdentityModule.outputs.managedIdentityWebAppOutput.id
applicationInsightsId: aifoundry.outputs.applicationInsightsId
azureSearchAdminKey:keyVault.getSecret('AZURE-SEARCH-KEY')
azureSearchServiceEndpoint:aifoundry.outputs.aiSearchTarget
sqlSystemPrompt: functionAppSqlPrompt
callTranscriptSystemPrompt: functionAppCallTranscriptSystemPrompt
streamTextSystemPrompt: functionAppStreamTextSystemPrompt
aiProjectConnectionString:keyVault.getSecret('AZURE-AI-PROJECT-CONN-STRING')
aiProjectName:aifoundry.outputs.aiProjectName
applicationInsightsConnectionString:aifoundry.outputs.applicationInsightsConnectionString
}
scope: resourceGroup(resourceGroup().name)
}
Expand Down
1 change: 1 addition & 0 deletions infra/main.bicepparam
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ param gptDeploymentCapacity = int(readEnvironmentVariable('AZURE_ENV_MODEL_CAPAC
param embeddingDeploymentCapacity = int(readEnvironmentVariable('AZURE_ENV_EMBEDDING_MODEL_CAPACITY', '80'))
param AzureOpenAILocation = readEnvironmentVariable('AZURE_ENV_OPENAI_LOCATION', 'eastus2')
param AZURE_LOCATION = readEnvironmentVariable('AZURE_LOCATION', '')
param existingLogAnalyticsWorkspaceId = readEnvironmentVariable('AZURE_ENV_LOG_ANALYTICS_WORKSPACE_ID', '')
Loading
Loading