Skip to content

Commit

Permalink
dont hardcode orchestration_strategy (#371)
Browse files Browse the repository at this point in the history
  • Loading branch information
ross-p-smith authored Mar 4, 2024
1 parent 8fa20a8 commit 64d4292
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
3 changes: 2 additions & 1 deletion code/backend/batch/utilities/helpers/ConfigHelper.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ def save_config_as_active(config):

@staticmethod
def get_default_config():
env_helper = EnvHelper()
default_config = {
"prompts": {
"condense_question_prompt": """Given the following conversation and a follow up question, rephrase the follow up question to be a standalone question. If the user asks multiple questions at once, break them up into multiple standalone questions, all in one line.
Expand Down Expand Up @@ -204,6 +205,6 @@ def get_default_config():
},
],
"logging": {"log_user_interactions": True, "log_tokens": True},
"orchestrator": {"strategy": "openai_function"},
"orchestrator": {"strategy": env_helper.ORCHESTRATION_STRATEGY},
}
return Config(default_config)
1 change: 1 addition & 0 deletions infra/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -753,3 +753,4 @@ output AZURE_SEARCH_KEY string = useKeyVault ? storekeys.outputs.SEARCH_KEY_NAME
output AZURE_CONTENT_SAFETY_KEY string = useKeyVault ? storekeys.outputs.CONTENT_SAFETY_KEY_NAME : ''
output AZURE_SPEECH_SERVICE_REGION string = location
output AZURE_SPEECH_SERVICE_KEY string = useKeyVault ? storekeys.outputs.SPEECH_KEY_NAME : ''
output ORCHESTRATION_STRATEGY string = orchestrationStrategy
6 changes: 5 additions & 1 deletion infra/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"_generator": {
"name": "bicep",
"version": "0.25.53.49325",
"templateHash": "11044000718103660256"
"templateHash": "709162983947072789"
}
},
"parameters": {
Expand Down Expand Up @@ -6635,6 +6635,10 @@
"AZURE_SPEECH_SERVICE_KEY": {
"type": "string",
"value": "[if(parameters('useKeyVault'), reference(extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', subscription().subscriptionId, variables('rgName')), 'Microsoft.Resources/deployments', 'storekeys'), '2022-09-01').outputs.SPEECH_KEY_NAME.value, '')]"
},
"ORCHESTRATION_STRATEGY": {
"type": "string",
"value": "[parameters('orchestrationStrategy')]"
}
}
}

0 comments on commit 64d4292

Please sign in to comment.