Skip to content

buhlergroup/azurechat

 
 

Repository files navigation

Azure Chat by Bühler Group

  1. Introduction
  2. Solution Overview
  3. Deploy to Azure
  4. Run from your local machine
  5. Deploy to Azure with GitHub Actions
  6. Add identity provider
  7. Chatting with your file
  8. Persona
  9. Extensions
  10. Environment variables
  11. Migration considerations
  12. 🧠 Reasoning Models & Summaries
  13. 🎯 Environment-Based Model Selection
  14. 🚀 Azure OpenAI v1 Responses API

Introduction

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.

✨ Latest Features

🧠 Advanced Reasoning Models

  • 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

🎯 Smart Model Selection

  • 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

🚀 Azure OpenAI v1 Responses API

  • 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

🛠️ Enhanced Debugging

  • 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

📁 SharePoint Integration

  • 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

Benefits

  1. Private: Deployed in your Azure tenancy, allowing you to isolate it to your Azure tenant.

  2. Controlled: Network traffic can be fully isolated to your network and other enterprise grade authentication security features are built in.

  3. Value: Deliver added business value with your own internal data sources (plug and play) or integrate with your internal services.

  4. Advanced AI: Support for cutting-edge reasoning models with transparent thinking processes.

  5. Flexible: Environment-based model selection allows easy configuration without code changes.

  6. Enterprise Ready: Native SharePoint integration for secure document access and collaboration.

Deploy to Azure

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

Deployment Options

You can deploy the application using one of the following options:

1. Azure Developer CLI

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.

  1. Download the Azure Developer CLI
  2. 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.
  3. Run azd up to 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 --debug

2. Azure Portal Deployment

Warning

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.

Deploy to Azure

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.

🛠️ Development & Debugging

Quick Start for Developers

  1. Clone and Setup:

    git clone https://github.com/buhlergroup/azurechat
    cd azurechat/src
    cp .env.example .env.local
    # Configure your environment variables
    npm install
  2. 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

VS Code Debugging

The project includes preconfigured VS Code debugging setups in .vscode/launch.json:

Debug Configurations

  • 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

Debugging Features

  • 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

Model Development & Testing

Environment-Based Model Selection

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-deployment

Only models with configured deployment names will appear in the model selector.

Reasoning Models

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-deployment

Features include:

  • Reasoning summaries with expandable thought processes
  • Effort level control (low/medium/high)
  • Debug logging for reasoning content extraction

v1 Responses API

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-1

Provides:

  • Background task support for long operations
  • Enhanced streaming with detailed events
  • Function calling improvements
  • MCP server integration

SharePoint Integration

Configure SharePoint document access for personas:

# Enable SharePoint integration in .env.local
NEXT_PUBLIC_SHAREPOINT_URL=https://yourtenant.sharepoint.com

Features 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

Troubleshooting

Common Issues

  1. Models not appearing: Check environment variables are set correctly
  2. Debugging not working: Ensure VS Code is configured and ports are available
  3. Reasoning not showing: Verify model supports reasoning and deployment is correct
  4. API errors: Check Azure OpenAI resource region and API version compatibility
  5. SharePoint access issues: Verify SharePoint URL and user permissions are configured correctly

Debug Logging

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.

Next

📚 Documentation

Core Features

Advanced Features

Configuration & Migration

API References

Latest Model Support

Reasoning Models

  • 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

Standard Models

  • 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

Enterprise Features

  • 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!

About

This project is a fork of microsoft/azurechat with additional enhancements and customizations.

About

Bühler Chat

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 97.0%
  • Bicep 2.4%
  • Other 0.6%