- Introduction
- Solution Overview
- Deploy to Azure
- Run from your local machine
- Deploy to Azure with GitHub Actions
- Add identity provider
- Chatting with your file
- Persona
- Extensions
- Environment variables
- Migration considerations
- 🧠 Reasoning Models & Summaries
- 🎯 Environment-Based Model Selection
- 🚀 Azure OpenAI v1 Responses API
Azure Chat powered by Azure Open AI Service
Azure Chat powered by Azure Open AI Service is a that allows organisations to deploy a private chat tenant in their Azure Subscription, with a familiar user experience and the added capabilities of chatting over your data and files.
- OpenAI o3, o3-pro, o3-mini, o4-mini support with reasoning summaries
- Auto-summarization of model reasoning process
- Expandable reasoning thoughts in the chat interface
- Multiple effort levels (low, medium, high) for reasoning tasks
- Environment-based model availability - only configured models appear in the selector
- Automatic model filtering based on deployment environment variables
- Support for latest models: GPT-4.1, GPT-4.1 Mini, GPT-4.1 Nano, o3, o3-pro, o4-mini, Computer Use Preview
- Dynamic model configuration without code changes
- Enhanced streaming capabilities with rich event types
- Background task support for long-running operations
- Improved function calling and tool integration
- Multimodal support with image generation and analysis
- MCP (Model Context Protocol) server integration
- VS Code launch configurations for full-stack debugging
- Comprehensive debug logging for API responses and reasoning
- Turbopack support for faster development
- Multiple debugging modes: server-side, client-side, and full-stack
- Direct SharePoint file access for persona knowledge bases
- SharePoint group-based access control for secure document sharing
- Real-time file picker with native SharePoint interface
- Automatic document processing from SharePoint libraries
- Secure token-based authentication for SharePoint resources
-
Private: Deployed in your Azure tenancy, allowing you to isolate it to your Azure tenant.
-
Controlled: Network traffic can be fully isolated to your network and other enterprise grade authentication security features are built in.
-
Value: Deliver added business value with your own internal data sources (plug and play) or integrate with your internal services.
-
Advanced AI: Support for cutting-edge reasoning models with transparent thinking processes.
-
Flexible: Environment-based model selection allows easy configuration without code changes.
-
Enterprise Ready: Native SharePoint integration for secure document access and collaboration.
You can provision Azure resources for the using either the Azure Developer CLI or the Deploy to Azure button below. Regardless of the method you chose you will still need set up an identity provider and specify an admin user
You can deploy the application using one of the following options:
Important
This section will create Azure resources and deploy the solution from your local environment using the Azure Developer CLI. Note that you do not need to clone this repo to complete these steps.
- Download the Azure Developer CLI
- If you have not cloned this repo, run
azd init -t microsoft/azurechat. If you have cloned this repo, just run 'azd init' from the repo root directory. - Run
azd upto provision and deploy the application
azd init -t microsoft/azurechat
azd up
# if you are wanting to see logs run with debug flag
azd up --debugWarning
This button will only create Azure resources. You will still need to deploy the application by following the deploy to Azure section to build and deploy the application using GitHub actions.
Click on the Deploy to Azure button to deploy the Azure resources for the application.
Important
The application is protected by an identity provider and follow the steps in Add an identity provider section for adding authentication to your app.
-
Clone and Setup:
git clone https://github.com/buhlergroup/azurechat cd azurechat/src cp .env.example .env.local # Configure your environment variables npm install
-
Run with Debugging:
# Standard development with Turbopack npm run dev # Debug mode without Turbopack npm run dev:debug # Debug mode with Turbopack and Node inspector npm run dev:turbo-debug
The project includes preconfigured VS Code debugging setups in .vscode/launch.json:
- Next.js: debug server-side - Debug backend API routes and server-side rendering
- Next.js: debug client-side - Debug React components in Chrome
- Next.js: debug full stack - Debug both frontend and backend simultaneously
- Breakpoint support in TypeScript/JavaScript
- Variable inspection and watch expressions
- Call stack navigation for API routes and React components
- Console output with integrated terminal
- Hot reload with debugging active
Configure which models appear in your chat interface by setting environment variables:
# Enable specific models in .env.local
AZURE_OPENAI_API_O3_DEPLOYMENT_NAME=o3-deployment
AZURE_OPENAI_API_O3_PRO_DEPLOYMENT_NAME=o3-pro-deployment
AZURE_OPENAI_API_GPT41_DEPLOYMENT_NAME=gpt41-deployment
AZURE_OPENAI_API_GPT41_MINI_DEPLOYMENT_NAME=gpt41-mini-deploymentOnly models with configured deployment names will appear in the model selector.
Test advanced reasoning capabilities with o3, o3-mini, and o4-mini models:
# Configure reasoning model deployment
AZURE_OPENAI_API_O3_DEPLOYMENT_NAME=your-o3-deployment
AZURE_OPENAI_API_O3_PRO_DEPLOYMENT_NAME=your-o3-pro-deploymentFeatures include:
- Reasoning summaries with expandable thought processes
- Effort level control (low/medium/high)
- Debug logging for reasoning content extraction
Enable enhanced API features:
# Configure v1 API models
AZURE_OPENAI_API_VERSION=preview
AZURE_OPENAI_API_GPT41_DEPLOYMENT_NAME=gpt-4.1
AZURE_OPENAI_GPT_IMAGE_DEPLOYMENT_NAME=gpt-image-1Provides:
- Background task support for long operations
- Enhanced streaming with detailed events
- Function calling improvements
- MCP server integration
Configure SharePoint document access for personas:
# Enable SharePoint integration in .env.local
NEXT_PUBLIC_SHAREPOINT_URL=https://yourtenant.sharepoint.comFeatures include:
- Direct file access from SharePoint libraries
- Group-based access control for secure sharing
- Native file picker interface
- Automatic document processing for persona knowledge bases
- Models not appearing: Check environment variables are set correctly
- Debugging not working: Ensure VS Code is configured and ports are available
- Reasoning not showing: Verify model supports reasoning and deployment is correct
- API errors: Check Azure OpenAI resource region and API version compatibility
- SharePoint access issues: Verify SharePoint URL and user permissions are configured correctly
Enable detailed logging for troubleshooting:
// Check console for detailed model and API information
console.log("🚀 Model configuration:", modelConfig);
console.log("🧠 Reasoning content:", reasoningContent);
console.log("📡 API response events:", streamEvents);See our detailed debugging documentation for more information.
- 🏃 Run Locally - Local development setup
- 🚀 Deploy to Azure - Production deployment
- 🔐 Identity Provider - Authentication setup
- 📄 Chat over Files - Document chat functionality
- 👤 Personas - AI assistant customization with SharePoint integration
- 🔌 Extensions - Extensibility framework
- 🧠 Reasoning Models & Summaries - o3, o3-mini, o4-mini with thought processes
- 🎯 Environment-Based Model Selection - Dynamic model configuration
- 🚀 Azure OpenAI v1 Responses API - Enhanced API features
- ⚙️ Environment Variables - Complete configuration reference
- 🔄 Migration Guide - Upgrade instructions and breaking changes
- 📡 OpenAI SDK Migration - SDK upgrade guide
- 🔄 OpenAI Responses API Streaming - Streaming implementation
- 📊 Chat API Sequence Diagram - API flow documentation
- o3: Advanced reasoning with detailed thought summaries
- o3-pro: Premium reasoning model with enhanced capabilities
- o3-mini: Efficient reasoning for faster responses
- o4-mini: Latest compact reasoning model
- GPT-4.1: Latest flagship model
- GPT-4.1 Mini: Efficient version of GPT-4.1
- GPT-4.1 Nano: Ultra-fast responses
- Computer Use Preview: Advanced automation capabilities
- GPT Image 1: Enhanced image generation and analysis
- SharePoint Integration: Direct access to corporate document libraries
- Group-based Access Control: Secure sharing via SharePoint groups
- Automatic Model Detection: Dynamic availability based on deployments Models automatically appear/disappear in the chat interface based on your Azure OpenAI deployment configuration - no code changes required!
This project is a fork of microsoft/azurechat with additional enhancements and customizations.
