Skip to content

LAION-AI/bud-e

Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

183 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

School Bud-E πŸŽ“πŸ€–

School Bud-E Banner

Welcome to School Bud-E, your AI-powered educational assistant!

Join us on Discord

Overview

School Bud-E is an intelligent and empathetic learning assistant designed to revolutionize the educational experience. Developed by LAION in collaboration with the ELLIS Institute TΓΌbingen, Collabora, the TΓΌbingen AI Center and the German Research Center for Artificial Intelligence (DFKI), and Intel, School Bud-E focuses on empathy, natural interaction, and personalized learning. A working demo of the application is available at school.bud-e.ai.

Features

  • Real-time chat with streaming responses
  • Voice input via Speech-to-Text (Whisper / Groq API)
  • Text-to-Speech playback for assistant responses
  • Multi-language support β€” English and German (internationalization)
  • PDF upload and parsing β€” send PDFs to the assistant for context
  • Image upload β€” share images with vision-capable models
  • Experimental image generation β€” generate and edit images via AI models (see below)
  • Persistent chat history β€” conversations saved to localStorage with images offloaded to IndexedDB
  • Multi-chat management β€” create, switch, rename, export, and import chat sessions
  • Character consistency β€” image generation supports character reference across turns
  • Privacy-focused design β€” local-first, no mandatory cloud dependency

Experimental Image Generation

This branch includes experimental features for AI image generation and editing.

The frontend supports generating and editing images directly in the chat interface. Both users and the AI assistant can trigger image generation using simple commands.

Supported Models

Alias Model Description
nano-banana gemini-2.5-flash-image Fast Gemini image generation
nano-banana-pro gemini-3-pro-image-preview Highest quality Gemini image generation
flux-2-klein flux-2-klein-9b Fast FLUX.2 generation
flux-2-pro flux-2-pro Balanced production quality
flux-2-max flux-2-max Maximum quality
dall-e-3 dall-e-3 OpenAI DALL-E 3

Quick Usage Examples

Generate an image:

{"imagegen": "A serene mountain landscape at sunset"}

Generate with a specific model:

{"imagegen": {"prompt": "A futuristic cityscape", "model": "nano-banana-pro", "aspectRatio": "16:9"}}

Edit the last image:

{"imageedit": "Make the sky purple and add stars"}

Hashtag format (user input):

#imagegen:nano-banana-pro:A detailed portrait of a cat wearing a hat

For the full image generation guide including all parameters, models, and troubleshooting, see image-generation-instructions.txt.

Image Persistence

Images generated or uploaded in the chat are stored in IndexedDB (namespaced per chat session), preventing QuotaExceededError in localStorage. Conversations with images can be exported to JSON and re-imported with full image data intact.

Technology Stack

  • Frontend: Fresh framework (Preact-based, Deno runtime)
  • Styling: Tailwind CSS
  • Language Support: English and German (internationalization)
  • AI Models:
    • Speech-to-Text: Whisper Large V3 (via Groq API)
    • LLM: GPT-4o or any OpenAI-compatible endpoint
    • Image generation: Gemini Flash/Pro Image, FLUX.2 Klein/Pro/Max, Imagen 3/4, DALL-E 3
  • Storage: localStorage + IndexedDB for chat and image persistence

Project Structure

school-bud-e-frontend/
β”œβ”€β”€ routes/
β”‚   β”œβ”€β”€ api/
β”‚   β”‚   β”œβ”€β”€ chat.ts          # LLM streaming endpoint
β”‚   β”‚   β”œβ”€β”€ tts.ts           # Text-to-Speech endpoint
β”‚   β”‚   β”œβ”€β”€ imagegen.ts      # Image generation endpoint
β”‚   β”‚   β”œβ”€β”€ getClientId.ts   # Client session ID
β”‚   β”‚   └── debug.ts         # Debug/health endpoint
β”‚   β”œβ”€β”€ index.tsx            # Main page
β”‚   β”œβ”€β”€ about.tsx            # About page
β”‚   └── _app.tsx             # App wrapper
β”œβ”€β”€ islands/
β”‚   β”œβ”€β”€ ChatIsland.tsx       # Main chat island (entry point)
β”‚   β”œβ”€β”€ ChatIsland/
β”‚   β”‚   β”œβ”€β”€ hooks/           # State and persistence hooks
β”‚   β”‚   β”œβ”€β”€ services/        # API calls, streaming, image store
β”‚   β”‚   └── utils/           # Trigger parsing, helpers
β”‚   β”œβ”€β”€ Header.tsx
β”‚   └── Menu.tsx
β”œβ”€β”€ components/
β”‚   β”œβ”€β”€ ChatTemplate.tsx     # Chat UI rendering
β”‚   β”œβ”€β”€ Settings.tsx         # Settings panel
β”‚   β”œβ”€β”€ ImageUploadButton.tsx
β”‚   β”œβ”€β”€ PdfUploadButton.tsx
β”‚   β”œβ”€β”€ AudioUploadButton.tsx
β”‚   └── ...
β”œβ”€β”€ internalization/         # i18n content (EN/DE)
β”œβ”€β”€ static/                  # Static assets
β”œβ”€β”€ docker-compose/          # Docker deployment config
└── image-generation-instructions.txt  # Full image gen guide

Getting Started: Development

  1. Clone the repository:

    git clone https://github.com/LAION-AI/school-bud-e-frontend.git
    cd school-bud-e-frontend
    git checkout experimental
  2. Set up environment variables:

    cp .example.env .env
    # Edit .env and fill in your API keys and endpoints
  3. Run the development server:

    deno task start
  4. Open http://localhost:8000 in your browser.

Getting Started: Production

Without Docker:

deno task build
deno task preview

With Docker:

git clone https://github.com/LAION-AI/school-bud-e-frontend.git
cd school-bud-e-frontend
cd docker-compose
nano .env   # Adjust environment variables
docker-compose up

Then open http://localhost:8000.

Environment Variables

Key variables (set in .env):

Variable Description
MIDDLEWARE_URL Base URL for the Admin Bud-E middleware
OPENAI_API_KEY OpenAI-compatible API key for LLM
GROQ_API_KEY Groq API key for Whisper STT
TTS_API_URL Text-to-Speech endpoint

See .example.env for the full list.

Middleware (Admin Bud-E)

The frontend communicates with a separate middleware service (Admin Bud-E) that handles:

  • LLM routing to multiple providers
  • Image generation (Gemini, FLUX.2, Imagen, DALL-E)
  • TTS and STT proxying
  • Provider configuration and pricing

The middleware is a separate repository and is not included here.

API Routes

  • /api/chat β€” Streaming LLM chat endpoint
  • /api/tts β€” Text-to-Speech conversion
  • /api/imagegen β€” Image generation (supports Gemini, FLUX.2, Imagen, DALL-E)
  • /api/getClientId β€” Unique session ID generation
  • /api/debug β€” Health/debug information

Contributing

We welcome contributions! Please join our Discord server or contact us at contact@laion.ai.

Disclaimer

This is an experimental prototype application. It may produce inaccurate answers or generate content not suitable for all audiences. Use with caution and report issues via the issue tracker.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Acknowledgements

Special thanks to LAION, ELLIS Institute TΓΌbingen, Collabora, the TΓΌbingen AI Center and the German Research Center for Artificial Intelligence (DFKI), and Intel for their contributions and support.


Built with for the future of education.

About

A general human-ai interaction platform.

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE
MIT
License.txt

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • Dart 59.3%
  • TypeScript 34.4%
  • Python 2.6%
  • C++ 2.0%
  • CMake 1.0%
  • Swift 0.3%
  • Other 0.4%