Skip to content

Commit 52d0265

Browse files
Deployment fixes (#287)
## Purpose Closes #286 (Fix default value for `azureOpenAIChatGptModelName`) Closes #287 (Fix bash script `if` nesting) Closes #289 (Fix bash script including `'` in files argument value) ## Does this introduce a breaking change? ``` [ ] Yes [x] No ``` ## Pull Request Type ``` [x] Bugfix [ ] Feature [ ] Code style update (formatting, local variables) [ ] Refactoring (no functional changes, no api changes) [ ] Documentation content changes [ ] Other... Please describe: ``` ## How to Test * Get the code ``` git clone [repo-address] cd [repo-name] git checkout [branch-name] ``` Open in devcontainer * Test the code ``` azd up ``` ## What to Check Verify that the following are valid * Deployment succeeds
1 parent 40380f0 commit 52d0265

File tree

3 files changed

+20
-18
lines changed

3 files changed

+20
-18
lines changed

app/prepdocs/PrepareDocs/Program.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818
await embedService.EnsureSearchIndexAsync(options.SearchIndexName);
1919

2020
Matcher matcher = new();
21-
matcher.AddInclude(options.Files);
21+
// From bash, the single quotes surrounding the path (to avoid expansion of the wildcard), are included in the argument value.
22+
matcher.AddInclude(options.Files.Replace("'", string.Empty));
2223

2324
var results = matcher.Execute(
2425
new DirectoryInfoWrapper(

infra/main.parameters.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@
2929
"openAiResourceGroupName": {
3030
"value": "${AZURE_OPENAI_RESOURCE_GROUP}"
3131
},
32-
"openAiResourceGroupLocation":{
32+
"openAiResourceGroupLocation": {
3333
"value": "${AZURE_OPENAI_RESOURCE_LOCATION=${AZURE_LOCATION}}"
34-
},
35-
"chatGptDeploymentName":{
34+
},
35+
"chatGptDeploymentName": {
3636
"value": "${AZURE_OPENAI_CHATGPT_DEPLOYMENT=chat}"
3737
},
38-
"embeddingDeploymentName":{
38+
"embeddingDeploymentName": {
3939
"value": "${AZURE_OPENAI_EMBEDDING_DEPLOYMENT=embedding}"
4040
},
4141
"openAiServiceName": {
@@ -86,22 +86,22 @@
8686
"computerVisionServiceName": {
8787
"value": "${AZURE_COMPUTERVISION_SERVICE_NAME}"
8888
},
89-
"useVision" : {
89+
"useVision": {
9090
"value": "${USE_VISION=false}"
9191
},
92-
"openAiChatGptDeployment":{
92+
"openAiChatGptDeployment": {
9393
"value": "${OPENAI_CHATGPT_DEPLOYMENT=gpt-3.5-turbo}"
9494
},
95-
"openAiEmbeddingDeployment":{
95+
"openAiEmbeddingDeployment": {
9696
"value": "${OPENAI_EMBEDDING_DEPLOYMENT=text-embedding-ada-002}"
9797
},
98-
"azureOpenAIChatGptModelVersion":{
98+
"azureOpenAIChatGptModelVersion": {
9999
"value": "${AZURE_OPENAI_CHATGPT_MODEL_VERSION=0613}"
100100
},
101101
"azureOpenAIChatGptModelName": {
102-
"value": "${AZURE_OPENAI_CHATGPT_MODEL_NAME=gpt-3.5-turbo}"
102+
"value": "${AZURE_OPENAI_CHATGPT_MODEL_NAME=gpt-35-turbo}"
103103
},
104-
"azureOpenAIChatGptDeploymentCapacity" : {
104+
"azureOpenAIChatGptDeploymentCapacity": {
105105
"value": "${AZURE_OPENAI_CHATGPT_DEPLOYMENT_CAPACITY=30}"
106106
}
107107
}

scripts/prepdocs.sh

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,30 +18,31 @@ if [ -z "$AZD_PREPDOCS_RAN" ] || [ "$AZD_PREPDOCS_RAN" = "false" ]; then
1818

1919
pwd
2020

21-
args = "--project "app/prepdocs/PrepareDocs/PrepareDocs.csproj" -- \
21+
args="--project "app/prepdocs/PrepareDocs/PrepareDocs.csproj" \
2222
'./data/*.pdf' \
2323
--storageendpoint "$AZURE_STORAGE_BLOB_ENDPOINT" \
2424
--container "$AZURE_STORAGE_CONTAINER" \
2525
--searchendpoint "$AZURE_SEARCH_SERVICE_ENDPOINT" \
2626
--searchindex "$AZURE_SEARCH_INDEX" \
2727
--formrecognizerendpoint "$AZURE_FORMRECOGNIZER_SERVICE_ENDPOINT" \
28-
--tenantid "$AZURE_TENANT_ID" \
29-
-v"
28+
--tenantid "$AZURE_TENANT_ID""
3029

3130
# if USE_VISION and AZURE_COMPUTERVISION_SERVICE_ENDPOINT is set, add --computervisionendpoint "$AZURE_COMPUTERVISION_SERVICE_ENDPOINT" to the command above
3231
if [ "$USE_VISION" = "true" ] && [ -n "$AZURE_COMPUTERVISION_SERVICE_ENDPOINT" ]; then
33-
args = "$args --computervisionendpoint $AZURE_COMPUTERVISION_SERVICE_ENDPOINT"
32+
args="$args --computervisionendpoint $AZURE_COMPUTERVISION_SERVICE_ENDPOINT"
3433
fi
3534

3635
# if USE_AOAI is true, add --openaiendpoint "$AZURE_OPENAI_ENDPOINT" to the command above
3736
if [ "$USE_AOAI" = "true" ]; then
3837
echo "use azure openai"
39-
args = "$args --openaiendpoint $AZURE_OPENAI_ENDPOINT"
40-
args = "$args --embeddingmodel $AZURE_OPENAI_EMBEDDING_DEPLOYMENT"
38+
args="$args --openaiendpoint $AZURE_OPENAI_ENDPOINT"
39+
args="$args --embeddingmodel $AZURE_OPENAI_EMBEDDING_DEPLOYMENT"
4140
else
4241
echo "use openai"
43-
args = "$args --embeddingmodel $OPENAI_EMBEDDING_DEPLOYMENT"
42+
args="$args --embeddingmodel $OPENAI_EMBEDDING_DEPLOYMENT"
43+
fi
4444

45+
args="$args --verbose"
4546

4647
echo "Running: dotnet run $args"
4748
dotnet run $args

0 commit comments

Comments
 (0)