Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request introduces support for an alternative AI client (
AIProjectClient
) in the Azure Function, allowing dynamic selection between the existing OpenAI client and the new AI Project client based on configuration. It also includes infrastructure updates to manage the required parameters and secrets, as well as script modifications for better environment handling.Azure Function Enhancements:
AIProjectClient
integration to the Azure Function, enabling it to use the AI Project client for chat completions when theUSE_AI_PROJECT_CLIENT
flag is set totrue
. This includes updates to thegreeting
andget_SQL_Response
methods to dynamically choose the client based on the configuration. (src/AzureFunction/function_app.py
: [1] [2] [3] [4] [5]requirements.txt
to includeazure-ai-projects
andazure-ai-inference
dependencies. (src/AzureFunction/requirements.txt
: src/AzureFunction/requirements.txtR11-R12)Infrastructure Updates:
aiProjectConnectionString
(secure) anduseAIProjectClientFlag
(default:false
) indeploy_azure_function.bicep
for configuring the AI Project client. (infra/bicep/deploy_azure_function.bicep
: infra/bicep/deploy_azure_function.bicepR29-R31)AZURE_AI_PROJECT_CONN_STRING
andUSE_AI_PROJECT_CLIENT
. (infra/bicep/deploy_azure_function.bicep
: infra/bicep/deploy_azure_function.bicepR188-R195)main.bicep
to retrieve the AI Project connection string from Key Vault and pass it to the Azure Function module. (infra/bicep/main.bicep
: infra/bicep/main.bicepR275)JSON Template Adjustments:
infra/bicep/main.json
: [1] [2] [3]Script Improvements:
run_create_index_scripts.sh
to revert Key Vault and managed identity client IDs in Python scripts after execution for better environment isolation. (infra/scripts/run_create_index_scripts.sh
: infra/scripts/run_create_index_scripts.shR162-R169)## PurposeDoes this introduce a breaking change?
Golden Path Validation
Deployment Validation
What to Check
Verify that the following are valid
Other Information