Skip to content
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
8 changes: 4 additions & 4 deletions infra/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ module "webapp" {
AZURE_SEARCH_SERVICE = module.searchServices.name
AZURE_SEARCH_SERVICE_ENDPOINT = module.searchServices.endpoint
AZURE_SEARCH_AUDIENCE = var.azure_search_scope
AZURE_OPENAI_CHATGPT_DEPLOYMENT = var.chatGptDeploymentName != "" ? var.chatGptDeploymentName : (var.chatGptModelName != "" ? var.chatGptModelName : "gpt-35-turbo-16k")
AZURE_OPENAI_CHATGPT_DEPLOYMENT = var.chatGptDeploymentName != "" ? var.chatGptDeploymentName : (var.chatGptModelName != "" ? var.chatGptModelName : "gpt-4o")
AZURE_OPENAI_CHATGPT_MODEL_NAME = var.chatGptModelName
AZURE_OPENAI_CHATGPT_MODEL_VERSION = var.chatGptModelVersion
USE_AZURE_OPENAI_EMBEDDINGS = var.useAzureOpenAIEmbeddings
Expand Down Expand Up @@ -508,11 +508,11 @@ module "openaiServices" {

deployments = [
{
name = var.chatGptDeploymentName != "" ? var.chatGptDeploymentName : (var.chatGptModelName != "" ? var.chatGptModelName : "gpt-35-turbo-16k")
name = var.chatGptDeploymentName != "" ? var.chatGptDeploymentName : (var.chatGptModelName != "" ? var.chatGptModelName : "gpt-4o")
model = {
format = "OpenAI"
name = var.chatGptModelName != "" ? var.chatGptModelName : "gpt-35-turbo-16k"
version = var.chatGptModelVersion != "" ? var.chatGptModelVersion : "0613"
name = var.chatGptModelName != "" ? var.chatGptModelName : "gpt-4o"
version = var.chatGptModelVersion != "" ? var.chatGptModelVersion : "2024-11-20"
}
sku = {
name = var.chatGptModelSkuName
Expand Down
64 changes: 64 additions & 0 deletions infracost_test.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
provider "azurerm" {
skip_provider_registration = true
features {}
}

resource "azurerm_linux_virtual_machine" "my_linux_vm" {
location = "eastus"
name = "test"
resource_group_name = "test"
admin_username = "testuser"
admin_password = "Testpa5s"

size = "Standard_F16s" # <<<<<<<<<< Try changing this to Standard_F16s_v2 to compare the costs

tags = {
Environment = "production"
Service = "web-app"
}

os_disk {
caching = "ReadWrite"
storage_account_type = "Standard_LRS"
}

network_interface_ids = [
"/subscriptions/123/resourceGroups/testrg/providers/Microsoft.Network/networkInterfaces/testnic",
]

source_image_reference {
publisher = "Canonical"
offer = "UbuntuServer"
sku = "16.04-LTS"
version = "latest"
}
}

resource "azurerm_service_plan" "my_app_service" {
location = "eastus"
name = "test"
resource_group_name = "test_resource_group"
os_type = "Windows"

sku_name = "P1v2"
worker_count = 4 # <<<<<<<<<< Try changing this to 8 to compare the costs

tags = {
Environment = "Prod"
Service = "web-app"
}
}

resource "azurerm_linux_function_app" "my_function" {
location = "eastus"
name = "test"
resource_group_name = "test"
service_plan_id = "/subscriptions/123/resourceGroups/testrg/providers/Microsoft.Web/serverFarms/serverFarmValue"
storage_account_name = "test"
storage_account_access_key = "test"
site_config {}

tags = {
Environment = "Prod"
}
}
160 changes: 160 additions & 0 deletions scripts/environments/local.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,160 @@
# Values that are required below are marked accordingly. Depending on your selections additional values may be required.
# Please see our deployment guide for more information at ./docs/deployment/deployment.md#configure-env-files

# Region to deploy into when running locally.
# This is set by the Azure Pipeline for other environments.
export LOCATION="uksouth" # Required
export WORKSPACE="vsepubaiassitpu" # Required
export SUBSCRIPTION_ID="fe269d52-8730-4616-93b9-590cd18ae14b" # Required

# ----------------------------------------------------------
# The following values determine the features that are enabled in the deployment.
# All of the feature flag parameters are required except for the SHAREPOINT_SITES and SHAREPOINT_FOLDERS parameters.
# ----------------------------------------------------------
#Update to target different environments. Supported values are AzureCloud, AzureUSGovernment.
export AZURE_ENVIRONMENT="AzureCloud"
# Update to "true" if you want to deploy the solution in a "secure" mode. The secure mode requires extra permissions and will require
# the user to have special access. In the "secure" mode, traffic within the Information Assistant will not use public endpoints.
export SECURE_MODE=false
# Update to "true" if you want to deploy the solution with the ability to use the Work + Web Chat feature.
# This feature will allow users to use web based search results to be a data source for grounding in the chat.
# Web Chat feature IS NOT supported in AZURE_ENVIRONMENT="AzureUSGovernment"
export ENABLE_WEB_CHAT=false
# If you are enabling the Web Chat feature, you can update the following values to "true" to enable safe search for the Bing data source.
# Defaults to true if not defined.
export ENABLE_BING_SAFE_SEARCH=false
# Update to "true" if you want to deploy the solution with the ability to use the Generative Chat feature.
# This feature will allow users to use native responses from the LLM without any data source for grounding in the chat.
export ENABLE_UNGROUNDED_CHAT=false
# Update to "true" if you want to deploy the solution with the ability to use the Math Assistant feature.
# This feature will allow users to use the Math Assistant feature to solve math problems.
export ENABLE_MATH_ASSISTANT=true
# Update to "true" if you want to deploy the solution with the ability to use the Tabular Data Assistant feature.
# This feature will allow users to use the Tabular Data Assistant feature to chat with CSV files.
export ENABLE_TABULAR_DATA_ASSISTANT=true
# Update to "true" if you want to deploy the solution with the ability to ingest data from SharePoint sites.
# This feature will allow users to use the SharePoint connector to ingest documents from folders in SharePoint.
export ENABLE_SHAREPOINT_CONNECTOR=false
# If the SharePoint connector is enabled, use the following settings for a list of sharepoint sites and folders you want to index.
# This is a SINGLE QUOTED JSON Object Array containing each sharepoint site and the corresponding entry folder
# Example: '[
# { "url": "https://yoursharepoint.com", "folder": "/Shared Documents/YourFolder"},
# { "url": "https://yoursharepoint.com", "folder": "/Shared Documents/YourFolder2"}
# ]'
# The app will crawl down from the folder specified into subfolders and files
# The forward slash for at the beginning of the folder is required i.e. "/Shared Documents"
# Specifying the root folder of "/Shared Documents" will crawl all your documents in your sharepoint site
export SHAREPOINT_TO_SYNC=''
# ----------------------------------------------------------
# End of feature flags
# ----------------------------------------------------------

# Use this setting to determine whether a user needs to be granted explicit access to the website via an
# Azure AD Enterprise Application membership (true) or allow the website to be available to anyone in the Azure tenant (false). Defaults to false.
# If set to true, A tenant level administrator will be required to grant the implicit grant workflow for the Azure AD App Registration manually.
export REQUIRE_WEBSITE_SECURITY_MEMBERSHIP=false # Required

# Information Assistant uses Key Vault to store keys for the Azure Services as secrets. These secrets require and expiration date to be compatible
# with Microsoft's recommended guardrails for Azure Key Vault policy. We have NOT included automatic secret rotation in this deployment. See
# https://learn.microsoft.com/en-us/azure/key-vault/keys/how-to-configure-key-rotation for more information on enabling cryptographic key auto-rotation.
# The following setting will set the secret expiration to the current day plus the number of days specified.
export SECRET_EXPIRATION_DAYS=730 # Required

# Uncomment this if you want to avoid the "are you sure?" prompt when applying TF changes
# export SKIP_PLAN_CHECK=1

# If using an existing deployment of Azure OpenAI, set the USE_EXISTING_AOAI to true and fill in the following values
# If you are deploying a new instance of Azure OpenAI, set the USE_EXISTING_AOAI to false and the following values are not required
# Using and existing instance of Azure OpenAI will NOT be allowed if deploying in Secure Mode
export USE_EXISTING_AOAI=false # Required
export AZURE_OPENAI_RESOURCE_GROUP=""
export AZURE_OPENAI_SERVICE_NAME=""
export AZURE_OPENAI_CHATGPT_DEPLOYMENT=""

# Choose your preferred text embedding model from below options of closed source and open source models.:
# 1. Azure OpenAI Embeddings
# 2. sentence-transformers/all-mpnet-base-v2 768
# 3. BAAI/bge-small-en-v1.5 384
# 4. For embedding in languages other than English:
# sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2 384


# To use Azure OpenAI Embeddings, set the following properties:
export USE_AZURE_OPENAI_EMBEDDINGS=true # Required
export AZURE_OPENAI_EMBEDDING_DEPLOYMENT_NAME="text-embedding-ada-002"

# If you prefer an open-source Embedding model, use below section to set your preferred model:

#-----------------------------------------------------------------------------------------------#
# export USE_AZURE_OPENAI_EMBEDDINGS=false
# export AZURE_OPENAI_EMBEDDING_DEPLOYMENT_NAME="text-embedding-ada-002"

#And choose one of your preferred open-source embedding models below. You only need to uncomment one from below.

# Uncomment and set the desired model and vector size:
# export OPEN_SOURCE_EMBEDDING_MODEL="BAAI/bge-small-en-v1.5"
# export OPEN_SOURCE_EMBEDDING_MODEL_VECTOR_SIZE="384"

# Uncomment and set the desired model and vector size:
# export OPEN_SOURCE_EMBEDDING_MODEL="sentence-transformers/all-mpnet-base-v2"
# export OPEN_SOURCE_EMBEDDING_MODEL_VECTOR_SIZE="768"

# Uncomment and set the desired model and vector size:
# export OPEN_SOURCE_EMBEDDING_MODEL="sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2"
# export OPEN_SOURCE_EMBEDDING_MODEL_VECTOR_SIZE="384"



#-------------------------------------------------------------------------------------------------#

# If you are doing a deployment where any of the following are true...
# 1. Azure OpenAI models are limited in your region
# 2. Azure OpenAI is not in the same Subscription as your current target subscription
# 3. You are deploying to USGov with Azure OpenAI in Azure Commercial
# ...then you will need to set the following values to the Azure OpenAI model you want to use.
export AZURE_OPENAI_CHATGPT_MODEL_NAME=""
export AZURE_OPENAI_CHATGPT_MODEL_VERSION=""
export AZURE_OPENAI_CHATGPT_SKU=""
export AZURE_OPENAI_EMBEDDINGS_MODEL_NAME=""
export AZURE_OPENAI_EMBEDDINGS_MODEL_VERSION=""
export AZURE_OPENAI_EMBEDDINGS_SKU=""
#-------------------------------------------------------------------------------------------------#

# If you have limited capacity in your subscription, you can set the following to limit the deployment capacity.
export AZURE_OPENAI_CHATGPT_MODEL_CAPACITY="1" # Required
export AZURE_OPENAI_EMBEDDINGS_MODEL_CAPACITY="1" # Required

# If your deployment requires a warning banner and footer, please set this variable.
export CHAT_WARNING_BANNER_TEXT=""

# A pointer to a supported language ENV file located in the ./languages folder.
export DEFAULT_LANGUAGE="en-US" # Required

# If you are deploying this for a customer, you can optionally set the following values to track usage of the agent template.
# This uses the pattern of Customer Usage Attribution, more info can be found at https://learn.microsoft.com/en-us/partner-center/marketplace/azure-partner-customer-usage-attribution
export ENABLE_CUSTOMER_USAGE_ATTRIBUTION=false
export CUSTOMER_USAGE_ATTRIBUTION_ID=""

# Branding
# Leave application title blank for the default name
export APPLICATION_TITLE="VSEMPLABS Demo"

# Enable capabilities under development. This should be set to false
export ENABLE_DEV_CODE=false

# If you are deploying the solution with the ability to use the Tabular Data Assistant feature, you can set the following values to configure max file size of csv files to be uploaded.
export MAX_CSV_FILE_SIZE="20" #default is 20MB

# Additional users who should be entra object owners. A comma seperated list of id's
export ENTRA_OWNERS=""

# Set a value here if you are required to apply a value in Entra for Service management references
export SERVICE_MANAGEMENT_REFERENCE=""

# A value used in terraform deployment to set the expiry of passwords measure in days.
# Change this setting if needed to conform to you policy requirements
export PASSWORD_LIFETIME=365

# A value used only in secure-mode to determine if the private vnet should be associated
# with a DDOS protection plan. This is set to false by default.
export ENABLE_DDOS_PROTECTION_PLAN=false