Skip to content
Merged
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
8 changes: 1 addition & 7 deletions .devcontainer/setup_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ git fetch
git pull

# provide execute permission to quotacheck script
chmod +x ./infra/scripts/checkquota.sh
sudo chmod +x ./infra/scripts/checkquota.sh

# Add the path to ~/.bashrc for persistence
if ! grep -q '/opt/mssql-tools18/bin' ~/.bashrc; then
Expand All @@ -20,9 +20,3 @@ if ! command -v sqlcmd &> /dev/null; then
exit 1
fi

# Install Azure function core tool
wget -q https://packages.microsoft.com/config/ubuntu/22.04/packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb

sudo apt-get update
sudo apt-get install azure-functions-core-tools-4
2 changes: 1 addition & 1 deletion .github/workflows/CAdeploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ jobs:
az deployment group create \
--resource-group ${{ env.RESOURCE_GROUP_NAME }} \
--template-file infra/main.bicep \
--parameters solutionPrefix=${{ env.SOLUTION_PREFIX }} cosmosLocation=${{ env.AZURE_LOCATION }}
--parameters AZURE_ENV_OPENAI_LOCATION=${{ env.AZURE_LOCATION }}

- name: List KeyVaults and Store in Array
id: list_keyvaults
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -401,3 +401,6 @@ FodyWeavers.xsd

scriptenv
.azure

clientdata
clienttranscripts
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Follow the quick deploy steps on the deployment guide to deploy this solution to
[Click here to launch the deployment guide](./docs/DeploymentGuide.md)


| [![Open in Codespaces](https://github.com/codespaces/badge.svg)](https://github.com/codespaces/new?repo=microsoft/Build-your-own-copilot-Solution-Accelerator&ref=dev) | [![Open in Dev Containers](https://img.shields.io/static/v1?style=for-the-badge&label=Dev%20Containers&message=Open&color=blue&logo=visualstudiocode)](https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/microsoft/Build-your-own-copilot-Solution-Accelerator&ref=dev) |
| [![Open in Codespaces](https://github.com/codespaces/badge.svg)](https://github.com/codespaces/new?repo=microsoft/Build-your-own-copilot-Solution-Accelerator) | [![Open in Dev Containers](https://img.shields.io/static/v1?style=for-the-badge&label=Dev%20Containers&message=Open&color=blue&logo=visualstudiocode)](https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/microsoft/Build-your-own-copilot-Solution-Accelerator) |
|---|---|

> ⚠️ **Important: Check Azure OpenAI Quota Availability** <br/>To ensure sufficient quota is available in your subscription, please follow [quota check instructions guide](./docs/quota_check.md) before you deploy the solution.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,11 @@ OS=$(uname | tr '[:upper:]' '[:lower:]')
if [[ "$OS" == "mingw"* || "$OS" == "cygwin"* || "$OS" == "msys"* ]]; then
echo "Running on Windows OS, will use interactive login"
echo "Getting signed in user email"
UserEmail=$(az ad signed-in-user show --query userPrincipalName -o tsv)
UserEmail=$(az ad signed-in-user show --query mail -o tsv)
# If the email is null or empty, use userPrincipalName
if [[ -z "$UserEmail" ]]; then
UserEmail=$(az ad signed-in-user show --query userPrincipalName -o tsv)
fi
# Execute the SQL query
echo "Executing SQL query..."
sqlcmd -S "$SqlServerName" -d "$SqlDatabaseName" -G -U "$UserEmail" -Q "$SQL_QUERY_FINAL" || {
Expand Down
1 change: 0 additions & 1 deletion infra/scripts/index_scripts/create_sql_tables.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
managed_identity_client_id = 'mici_to-be-replaced'

import pandas as pd
import pymssql
import os
from datetime import datetime

Expand Down
1 change: 0 additions & 1 deletion infra/scripts/index_scripts/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ azure-ai-textanalytics
azure-search-documents==11.6.0b9
azure-keyvault-secrets
pandas
pymssql
datetime

pyodbc==5.2.0
12 changes: 11 additions & 1 deletion infra/scripts/run_create_index_scripts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -118,13 +118,23 @@ if [ -n "$managedIdentityClientId" ]; then
sed -i "s/mici_to-be-replaced/${managedIdentityClientId}/g" ${pythonScriptPath}"create_sql_tables.py"
fi

# Determine the correct Python command
if command -v python3 &> /dev/null; then
PYTHON_CMD="python3"
elif command -v python &> /dev/null; then
PYTHON_CMD="python"
else
echo "Python is not installed on this system. Or it is not added in the PATH."
exit 1
fi

# create virtual environment
# Check if the virtual environment already exists
if [ -d $pythonScriptPath"scriptenv" ]; then
echo "Virtual environment already exists. Skipping creation."
else
echo "Creating virtual environment"
python3 -m venv $pythonScriptPath"scriptenv"
$PYTHON_CMD -m venv $pythonScriptPath"scriptenv"
fi

# Activate the virtual environment
Expand Down