- Introduction
- Run from your local machine
- Add identity provider
- Chatting with your file
- Persona
- Extensions
- Environment variables
- Migration considerations
- Reasoning Models & Summaries
- Environment-Based Model Selection
Bühler Chat — a private AI chat platform for the Bühler Group
Bühler Chat allows the organisation to run a private chat environment with a familiar user experience and the added capabilities of chatting over your data and files.
- 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
- Dynamic model configuration without code changes
- 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 own tenancy, isolating data from external services.
-
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.
-
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_GPT55_DEPLOYMENT_NAME=gpt55-deployment
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 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
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 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);- Run Locally - Local development setup
- Identity Provider - Authentication setup
- Chat over Files - Document chat functionality
- Personas - AI assistant customization with SharePoint integration
- Extensions - Extensibility framework
- Reasoning Models & Summaries - o3, o4-mini with thought processes
- Environment-Based Model Selection - Dynamic model configuration
- 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
This project was initially forked from microsoft/azurechat.