- The code in this repo is adapted from the Azure Samples ChatGPT + Enterprise data with Azure OpenAI and Cognitive Search Demo
- Deploy a python based web application interface to an Azure App Service Environment that interacts with Azure OpenAI, Cognitive Search, and Azure Storage Blob.
IMPORTANT: In order to deploy and run this example, you'll need an existing Azure subscription with deployed Azure OpenAI service, Cognitive Search, Azure Storage Account and documents loaded in per the Azure Samples ChatGPT + Enterprise data with Azure OpenAI and Cognitive Search Demo.
AZURE RESOURCE COSTS by default this sample will create Azure App Service that have a monthly cost.
- Azure Developer CLI
- Python 3+
- Important: Python and the pip package manager must be in the path in Windows for the setup scripts to work.
- Important: Ensure you can run
python --version
from console. On Ubuntu, you might need to runsudo apt install python-is-python3
to linkpython
topython3
.
- Node.js
- Git
NOTE: Your Azure Account must have
Microsoft.Authorization/roleAssignments/write
permissions, such as User Access Administrator or Owner.
- Configure Environment Variables or Update main.parameters.json file with apprpriate values.
- Deploy the App Service Plan and App Service from the Bicep file
az deployment sub create --location <location> --template-file infra\main.bicep --parameters infra\main.parameters.json
- Upload the web application code
az webapp deploy --name <app service name> --resource-group <resource group name> --src-path app-deploy.zip
- Run the azd package command
azd package
The output of successfully running the above command will show the path where the new .zip package will be located. 2. Upload the generaged zip package to your app service
az webapp deploy --name <app service name> --resource-group <resource group name> --src-path <path/to/recompiled-app.zip>
- In Azure: The URL is printed in the outputs when the bicep template completes (as "BACKEND_URI"), or you can find it in the Azure portal by browsing to the Application Service that was deployed.
Once in the web app:
- Try different topics in chat or Q&A context. For chat, try follow up questions, clarifications, ask to simplify or elaborate on answer, etc.
- Explore citations and sources
- Click on "settings" to try different options, tweak prompts, etc.