Skip to content
 
 

Repository files navigation

Bühler Chat Logo

Bühler Chat

  1. Introduction
  2. Run from your local machine
  3. Add identity provider
  4. Chatting with your file
  5. Persona
  6. Extensions
  7. Environment variables
  8. Migration considerations
  9. Reasoning Models & Summaries
  10. Environment-Based Model Selection

Introduction

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.

Latest Features

Advanced Reasoning Models

  • 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
  • Dynamic model configuration without code changes

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 own tenancy, isolating data from external services.

  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.

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

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

Reasoning Models

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

Features include:

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

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 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);

Next

Documentation

Core Features

Advanced Features

Configuration & Migration

API References

This project was initially forked from microsoft/azurechat.

About

Bühler Chat

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages