Repolode
Azure-Samples

Azure-Samples/openai-chat-app-quickstart

A Python chat web app that calls Azure OpenAI with managed identity, provisioned and deployed to Azure Container Apps via azd.

Stars
254
Forks
140
Open issues
24
Last commit
7 days ago

What is it?

This template is a small Python chat application that generates responses to user messages with Azure OpenAI. The backend is a Quart app using the openai package, and the browser frontend streams replies from the server as JSON Lines over a ReadableStream.

The project also ships Bicep files that provision the Azure resources it needs: Azure OpenAI, Azure Container Apps, Azure Container Registry, Log Analytics, and the RBAC roles. By default the app authenticates to Azure OpenAI with managed identity instead of API keys. Running `azd up` provisions everything and deploys the app, and `azd deploy` redeploys after code changes.

For local development, you copy the sample environment file, fill in the endpoint and tenant ID from your deployed resources, and run the Quart server on port 50505. Codespaces and Dev Containers configurations are included for a ready-made environment.

Key features

  • 01Python Quart backend that generates chat replies with the openai package
  • 02Browser frontend that streams responses over JSON Lines
  • 03Bicep templates provisioning Azure OpenAI, Container Apps, and Container Registry
  • 04Managed identity authentication to Azure OpenAI by default
  • 05Deployment with a single azd command
  • 06Codespaces and Dev Containers setup included

Use cases

  • Starting a chat front end on Azure OpenAI without storing API keys
  • Learning how to deploy a Python AI app to Azure Container Apps
  • Prototyping a simple chatbot that can be redeployed quickly with azd

Quick start

  1. 1

    Download the project code with azd

    azd init -t openai-chat-app-quickstart
  2. 2

    Log in to Azure

    azd auth login
  3. 3

    Provision and deploy all resources to Azure

    azd up

Things to know

  • Requires an Azure subscription and approved access to Azure OpenAI Service.
  • Running it costs money on Azure, and the README advises deleting resources when they are no longer needed.

In collections

Topics

#azure-openai#azure-container-apps#python#chatbot#bicep#managed-identity#llm#ai-azd-templates#azd-templates

FAQ

What is openai-chat-app-quickstart?
A Python chat web app that calls Azure OpenAI with managed identity, provisioned and deployed to Azure Container Apps via azd. This template is a small Python chat application that generates responses to user messages with Azure OpenAI. The backend is a Quart app using the openai package, and the browser frontend streams replies from the server as JSON Lines over a ReadableStream.
Is openai-chat-app-quickstart free to use? What license does it have?
openai-chat-app-quickstart is open source under the MIT license. Check the license terms before using it in commercial products.
Is openai-chat-app-quickstart still maintained?
Actively maintained. The last commit to openai-chat-app-quickstart was on Nov 1, 2026.
What can I use openai-chat-app-quickstart for?
Starting a chat front end on Azure OpenAI without storing API keys Learning how to deploy a Python AI app to Azure Container Apps Prototyping a simple chatbot that can be redeployed quickly with azd
How do I install openai-chat-app-quickstart?
Download the project code with azd: azd init -t openai-chat-app-quickstart Log in to Azure: azd auth login Provision and deploy all resources to Azure: azd up
Where can I get openai-chat-app-quickstart?
The source code and installation instructions are on GitHub: https://github.com/Azure-Samples/openai-chat-app-quickstart

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects