This repo is for the second day pro code track for Microsoft Federal Developer Summit on November 13th-14th, 20204. It contains a Python Streamlit bot which leverages Azure OpenAI and AI Search.
Github Codespaces or
- Bicep v0.30.3 or higher
- Az CLI (moderately current version)
- Contributor and User Access Administrator on a subscription (Or Owner)
- VSCode w/ necessary extensions, or ability to add them
- Create a new fork of this repo in your personal GitHub account
- In newly created repo(in your account) launch a new Codespaces workspace
- Run
az login
- use Dev Summit provided login and password - Optional Run
az account set -s <subscriptionId>
if more than one subscription is present - Run
cd infra
to navigate to the directory containing the bicep deployment code - Run
az deployment sub create --template-file main.bicep --parameters main.parameters.json --location eastus2 --name "icecream-chat-*YOUR INITALS*"
note: The --name
parameter is a global variable used to set both the name of the deployment at the subscription level as well as the resources that are being provisioned.
note: Azure OpenAI, AI Search, and Multi-service account deploy within East US. To update this value change param locationAI string = 'eastus'
within resources.bicep
on line #27 or specify it as an additional parameter with locationAI="<desiredRegion>"
After deployment is complete, which will take approximately 30-35 minutes (API Management is the long running process, the environment can start being used before that time but do not close the terminal session), copy the following outputs to a safe place for later use:
app_url
, appServcePrincipalKey
, appServicePrincipalId
, azure_subscription_id
, azure_subscripton_name
, and azure_tenant_Id
"outputs": {
"app_url": {
"type": "String",
"value": "https://<your-site>.azurewebsites.net"
},
"appServicePrincipalId": {
"type": "String",
"value": "00000000-0000-0000-0000-000000000000"
},
"appServicePrincipalKey": {
"type": "String",
"value": "<your-super!secret_.key>"
},
"azure_subscription_id": {
"type": "String",
"value": "00000000-0000-0000-0000-000000000000"
},
"azure_subscription_name": {
"type": "String",
"value": "<friendly-subscription-name>"
},
"azure_tenant_id": {
"type": "String",
"value": "00000000-0000-0000-0000-000000000000"
}
},
- Follow steps for fork repo and deploy environment
- Review RBAC and make updates to necessary services
- Review storage, upload icecream files to be indexed
- Deploy Azure OpenAI models - gpt-4o, text-ada-embedding
- Create vector index from AI search
- Use github actions to push image
- Update App Service, create/sen environment variables
- Use OpenAI Playground to perform prompt engineering, update code with refined prompt
- Implement APIM