Azure AI Chat Assistant Deployment

One-click deployment of a fully automated AI chat assistant with GPT-4.1-mini and GPT-image-1 image generation capabilities

Deploy Now

High-Level Overview

High-Level Overview

This solution fully automates the creation, configuration, and deployment of an AI chat assistant application on Azure with vector search capabilities.

Key Features:

Prerequisites

Before deploying, ensure you have the following set up:

Solution Architecture

The deployment includes the following Azure components:

Azure AI Chat Assistant Architecture User Domain/DNS Ubuntu VM (SSL, Web App) Networking (VNet, NSG, IP, install.sh) Azure OpenAI (GPT-4, Image Gen) Vector Search (RAG Database) Blob Storage (File Upload) Compute & AI Services Domain/DNS Networking

Detailed Deployment Process

Authentication

Uses ClientSecretCredential to authenticate with Azure using service principal credentials (AZURE_CLIENT_ID, AZURE_CLIENT_SECRET, AZURE_TENANT_ID).

Quota Checks

Before provisioning, checks quotas for Azure OpenAI service usage, VM vCPU cores, storage account quotas, and network resource quotas.

Resource Group and Storage Account

Creates or updates an Azure Resource Group and Storage Account with Standard_LRS SKU and StorageV2 kind.

Azure Container Storage

Creates an Azure container storage to receive your custom file uploads to enable vector database embedding.

Azure OpenAI Resource and Deployments

Creates an Azure OpenAI resource with SKU "S0" and two deployments: gpt-4.1-mini (chat/completions) and gpt-image-1 (image generation).

Setup Script Generation

Generates a detailed bash setup script that will run on the VM after provisioning to install all dependencies and configure the application.

Networking Setup

Creates Azure Virtual Network, subnet, Public IP, Network Security Group with inbound rules for ports 22, 80, 443, and 8000.

Virtual Machine Creation

Creates a VM with specified size and Ubuntu 22.04 LTS image, using the Network Interface created above.

DNS Setup

Creates or retrieves an Azure DNS zone for the domain and adds an A record pointing to the VM's public IP.

VM Custom Script Extension

Attaches a Custom Script Extension to the VM to download and run the setup script from Blob Storage during provisioning.

Key Components

Azure OpenAI Service

GPT-4 for chat completions and image generation capabilities with secure API access.

Vector Search and File Upload

Integrated vector search index for enhanced AI capabilities and contextual responses with easy to use file-upload.

Secure Networking

Virtual Network with Network Security Group and properly configured inbound rules.

Automated Deployment

Custom Script Extension handles all VM configuration automatically during provisioning.

SSL Certificates

Automatic Let's Encrypt certificate generation and configuration with certbot.

Monitoring Ready

Built-in logging and error handling throughout the deployment process.

Deployment Options

This solution can be deployed through multiple methods:

One-Click Deployment

Use the button below to initiate the deployment process:

Deploy to Azure

Note: You will need appropriate Azure permissions and service principal credentials.

Manual Deployment Steps

  1. Ensure you have Azure CLI installed and authenticated
  2. Clone the deployment repository
  3. Configure environment variables in .env file
  4. Run the deployment script

Use Cases