Skip to content

Commit

Permalink
fix function error
Browse files Browse the repository at this point in the history
  • Loading branch information
zedy committed Feb 8, 2024
1 parent 4a1ef31 commit 97eb155
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 0 deletions.
28 changes: 28 additions & 0 deletions code/backend/batch/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
azure-functions==1.18.0
streamlit==1.30.0
openai==1.6.1
matplotlib==3.8.2
plotly==5.18.0
scipy==1.11.4
scikit-learn==1.3.2
transformers==4.36.2
python-dotenv==1.0.1
azure-ai-formrecognizer==3.3.2
azure-storage-blob==12.19.0
azure-identity==1.15.0
azure-ai-contentsafety==1.0.0
requests==2.31.0
tiktoken==0.5.2
azure-storage-queue==12.9.0
langchain==0.1.4
beautifulsoup4==4.12.3
fake-useragent==1.4.0
chardet==5.2.0
--extra-index-url https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-python/pypi/simple/
azure-search-documents==11.4.0b8
opencensus-ext-azure==1.1.13
pandas==1.5.1
python-docx==1.1.0
azure-keyvault-secrets==4.4.*
# Add dev dependencies here - this will be refactored out by Poetry
pytest==7.4.4
3 changes: 3 additions & 0 deletions infra/app/function.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,14 @@ param azureOpenAIName string = ''
param azureAISearchName string = ''
param formRecognizerName string = ''
param contentSafetyName string = ''
param speechServiceName string = ''
param useKeyVault bool
param openAIKeyName string = ''
param storageAccountKeyName string = ''
param formRecognizerKeyName string = ''
param searchKeyName string = ''
param contentSafetyKeyName string = ''
param speechKeyName string = ''
param keyVaultEndpoint string = ''
param authType string

Expand All @@ -44,6 +46,7 @@ module function '../core/host/functions.bicep' = {
AZURE_BLOB_ACCOUNT_KEY: useKeyVault ? storageAccountKeyName : listKeys(resourceId(subscription().subscriptionId, resourceGroup().name, 'Microsoft.Storage/storageAccounts', storageAccountName), '2021-09-01').keys[0].value
AZURE_FORM_RECOGNIZER_KEY: useKeyVault ? formRecognizerKeyName : listKeys(resourceId(subscription().subscriptionId, resourceGroup().name, 'Microsoft.CognitiveServices/accounts', formRecognizerName), '2023-05-01').key1
AZURE_CONTENT_SAFETY_KEY: useKeyVault ? contentSafetyKeyName : listKeys(resourceId(subscription().subscriptionId, resourceGroup().name, 'Microsoft.CognitiveServices/accounts', contentSafetyName), '2023-05-01').key1
AZURE_SPEECH_SERVICE_KEY: useKeyVault ? speechKeyName: listKeys(resourceId(subscription().subscriptionId, resourceGroup().name, 'Microsoft.CognitiveServices/accounts', speechServiceName), '2023-05-01').key1
})
}
}
Expand Down
2 changes: 2 additions & 0 deletions infra/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -458,12 +458,14 @@ module function './app/function.bicep' = {
storageAccountName: storage.outputs.name
formRecognizerName: formrecognizer.outputs.name
contentSafetyName: contentsafety.outputs.name
speechServiceName: speechService.outputs.name
clientKey: clientKey
openAIKeyName: useKeyVault ? storekeys.outputs.OPENAI_KEY_NAME : ''
storageAccountKeyName: useKeyVault ? storekeys.outputs.STORAGE_ACCOUNT_KEY_NAME : ''
formRecognizerKeyName: useKeyVault ? storekeys.outputs.FORM_RECOGNIZER_KEY_NAME : ''
searchKeyName: useKeyVault ? storekeys.outputs.SEARCH_KEY_NAME : ''
contentSafetyKeyName: useKeyVault ? storekeys.outputs.CONTENT_SAFETY_KEY_NAME : ''
speechKeyName: useKeyVault ? storekeys.outputs.SPEECH_KEY_NAME: ''
useKeyVault: useKeyVault
keyVaultName: useKeyVault || authType == 'rbac' ? keyvault.outputs.name : ''
keyVaultEndpoint: useKeyVault ? keyvault.outputs.endpoint : ''
Expand Down

0 comments on commit 97eb155

Please sign in to comment.