Skip to content

feat: AI Foundry SDK change #499

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from
Closed

Conversation

Abdul-Microsoft
Copy link
Contributor

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:

  • Added AIProjectClient integration to the Azure Function, enabling it to use the AI Project client for chat completions when the USE_AI_PROJECT_CLIENT flag is set to true. This includes updates to the greeting and get_SQL_Response methods to dynamically choose the client based on the configuration. (src/AzureFunction/function_app.py: [1] [2] [3] [4] [5]
  • Updated requirements.txt to include azure-ai-projects and azure-ai-inference dependencies. (src/AzureFunction/requirements.txt: src/AzureFunction/requirements.txtR11-R12)

Infrastructure Updates:

  • Introduced new parameters aiProjectConnectionString (secure) and useAIProjectClientFlag (default: false) in deploy_azure_function.bicep for configuring the AI Project client. (infra/bicep/deploy_azure_function.bicep: infra/bicep/deploy_azure_function.bicepR29-R31)
  • Updated environment variables in the Azure Function resource to include AZURE_AI_PROJECT_CONN_STRING and USE_AI_PROJECT_CLIENT. (infra/bicep/deploy_azure_function.bicep: infra/bicep/deploy_azure_function.bicepR188-R195)
  • Modified 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:

  • Reflected the new parameters and environment variables in the generated JSON templates, including secure handling of the connection string. (infra/bicep/main.json: [1] [2] [3]

Script Improvements:

  • Enhanced 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)## Purpose
  • ...

Does this introduce a breaking change?

  • Yes
  • No

Golden Path Validation

  • I have tested the primary workflows (the "golden path") to ensure they function correctly without errors.

Deployment Validation

  • I have validated the deployment process successfully and all services are running as expected with this change.

What to Check

Verify that the following are valid

  • ...

Other Information

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants