Skip to content

Commit

Permalink
Fix AZURE_SEARCH_USE_SEMANTIC_SEARCH env var (#202)
Browse files Browse the repository at this point in the history
  • Loading branch information
cecheta authored Jan 17, 2024
1 parent 3dd4686 commit 9fbd636
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 16 deletions.
2 changes: 1 addition & 1 deletion code/app/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def get_config():
AZURE_SEARCH_SERVICE = os.environ.get("AZURE_SEARCH_SERVICE")
AZURE_SEARCH_INDEX = os.environ.get("AZURE_SEARCH_INDEX")
AZURE_SEARCH_KEY = os.environ.get("AZURE_SEARCH_KEY")
AZURE_SEARCH_USE_SEMANTIC_SEARCH = os.environ.get("AZURE_SEARCH_USE_SEMANTIC_SEARCH", False)
AZURE_SEARCH_USE_SEMANTIC_SEARCH = os.environ.get("AZURE_SEARCH_USE_SEMANTIC_SEARCH", "False")
AZURE_SEARCH_SEMANTIC_SEARCH_CONFIG = os.environ.get("AZURE_SEARCH_SEMANTIC_SEARCH_CONFIG", "default")
AZURE_SEARCH_TOP_K = os.environ.get("AZURE_SEARCH_TOP_K", 5)
AZURE_SEARCH_ENABLE_IN_DOMAIN = os.environ.get("AZURE_SEARCH_ENABLE_IN_DOMAIN", "true")
Expand Down
3 changes: 2 additions & 1 deletion infra/deployment.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ resource ContentSafety 'Microsoft.CognitiveServices/accounts@2022-03-01' = {
networkAcls: {
defaultAction: 'Allow'
virtualNetworkRules: []
ipRules: []
ipRules: []
}
}
}
Expand All @@ -315,6 +315,7 @@ resource Website 'Microsoft.Web/sites@2020-06-01' = {
{ name: 'APPINSIGHTS_CONNECTION_STRING', value: reference(ApplicationInsights.id, '2015-05-01').ConnectionString}
{ name: 'AZURE_SEARCH_SERVICE', value: 'https://${AzureCognitiveSearch}.search.windows.net'}
{ name: 'AZURE_SEARCH_INDEX', value: AzureSearchIndex}
{ name: 'AZURE_SEARCH_USE_SEMANTIC_SEARCH', value: AzureSearchUseSemanticSearch }
{ name: 'AZURE_SEARCH_CONVERSATIONS_LOG_INDEX', value: AzureSearchConversationLogIndex}
{ name: 'AZURE_AUTH_TYPE', value: authType }
{ name: 'AZURE_SEARCH_KEY', value: authType == 'keys' ? listAdminKeys('Microsoft.Search/searchServices/${AzureCognitiveSearch}', '2021-04-01-preview').primaryKey : null}
Expand Down
32 changes: 18 additions & 14 deletions infra/deployment.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.23.1.45101",
"templateHash": "7448892413282893472"
"version": "0.24.24.22086",
"templateHash": "10256225358486194260"
}
},
"parameters": {
Expand Down Expand Up @@ -514,6 +514,10 @@
"name": "AZURE_SEARCH_INDEX",
"value": "[parameters('AzureSearchIndex')]"
},
{
"name": "AZURE_SEARCH_USE_SEMANTIC_SEARCH",
"value": "[parameters('AzureSearchUseSemanticSearch')]"
},
{
"name": "AZURE_SEARCH_CONVERSATIONS_LOG_INDEX",
"value": "[parameters('AzureSearchConversationLogIndex')]"
Expand Down Expand Up @@ -1149,8 +1153,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.23.1.45101",
"templateHash": "8211880587811090337"
"version": "0.24.24.22086",
"templateHash": "2184194315885104837"
},
"description": "Creates a role assignment for a service principal."
},
Expand Down Expand Up @@ -1218,8 +1222,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.23.1.45101",
"templateHash": "8211880587811090337"
"version": "0.24.24.22086",
"templateHash": "2184194315885104837"
},
"description": "Creates a role assignment for a service principal."
},
Expand Down Expand Up @@ -1287,8 +1291,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.23.1.45101",
"templateHash": "8211880587811090337"
"version": "0.24.24.22086",
"templateHash": "2184194315885104837"
},
"description": "Creates a role assignment for a service principal."
},
Expand Down Expand Up @@ -1356,8 +1360,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.23.1.45101",
"templateHash": "8211880587811090337"
"version": "0.24.24.22086",
"templateHash": "2184194315885104837"
},
"description": "Creates a role assignment for a service principal."
},
Expand Down Expand Up @@ -1425,8 +1429,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.23.1.45101",
"templateHash": "8211880587811090337"
"version": "0.24.24.22086",
"templateHash": "2184194315885104837"
},
"description": "Creates a role assignment for a service principal."
},
Expand Down Expand Up @@ -1494,8 +1498,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.23.1.45101",
"templateHash": "8211880587811090337"
"version": "0.24.24.22086",
"templateHash": "2184194315885104837"
},
"description": "Creates a role assignment for a service principal."
},
Expand Down

0 comments on commit 9fbd636

Please sign in to comment.