ai-ui

ai-ui

A small, self-hosted ChatGPT-like web interface written in Go with document context (RAG), connected to Azure OpenAI-compatible deployments, with an optional identity-backed Microsoft Foundry deployment inventory.

Documentation GitHub Latest release Screenshots

Features

  • Chat interface with a drag-resizable sidebar, multiple conversations and history; the desktop width is saved per browser
  • Single-level named chat groups with optional colors, persistent collapse state, drag-and-drop movement and a keyboard/touch-accessible Move action
  • Answer streaming (token by token) via server-sent events
  • A copy icon below every input and completed answer copies the full message with rich formatting (headings, emphasis, lists, tables and code) where supported
  • A retry icon beside Copy sends the original question as a new user message after confirmation, using current history and settings without replacing earlier messages
  • Streaming follows the latest output only while you stay at the bottom. Scrolling up preserves your reading position; a jump-to-latest control shows whether the response is still running, reconnecting, or has finished
  • Model configuration stays in Settings rather than a selector in the chat header. The footer alongside token usage identifies the model that actually replied, using the same typography. Existing per-chat model selections are preserved
  • Optional Foundry inventory with metadata-only Refresh and separate defaults for chat, embeddings, images and vision. Deployment aliases are mapped to canonical model metadata; unsupported deployments remain visible
  • Reasoning effort selectable per chat next to the input field; the offered values follow the selected model
  • Document upload as RAG context (embeddings + brute-force cosine search). PDF (layout aware: lines and columns survive), Word (.docx, including tables, headers, footers and footnotes - tracked deletions and field codes are left out), Excel (.xlsx, sheet by sheet as tab separated rows), PowerPoint (.pptx, slides plus speaker notes), RTF, HTML/XML, Markdown, CSV, JSON, YAML and source code. Anything else that is textual is recognized by its content, so a file without a useful name or type still works
  • Scanned PDFs are read automatically: a PDF without a text layer has its pages transcribed by the vision model, one request per page, and the transcript is embedded like any other document. The upload notice says which files were read that way and how many pages, because a transcription can be imperfect in a way a parsed document is not
  • Attach files next to the input field (📎) or drag and drop them into the chat window; attachments are shown as chips above the input. Documents reach the model as retrieved context sections, attached images are sent along with the message so a vision capable model can look at them. The names of all attachments are part of the prompt, so the model knows what it has
  • The model follows the attachment: a picture attached while a text-only model is selected is answered by the first vision capable entry of AZURE_MODELS in manual mode, or the configured vision fallback in Foundry mode. The switch applies to that one answer without changing the stored chat model, and the model tag names whoever replied
  • Optional web search (🌐) per request: pulls in current online results as context - provider agnostic (Tavily, Brave Search, SearXNG)
  • Optional image generation (🖼): the toggle switches the next message from a chat answer to a generated image (for example, gpt-image-2.5-sunburst or FLUX.2-pro); images are stored in the database and shown inline. In image mode an attached image turns the next prompt into an edit of that image. Image deployments are configured in Settings
  • With an image model configured, explicit image requests in ordinary chat can call the image generator automatically. Follow-up edits use the latest image; ordinary answers stay with the chat model. These image calls incur usage charges; manual image mode remains available.
  • The Image model selector shares the toolbar with Attach and Reasoning; image parameters join the same toolbar in model-specific groups separated by subtle dividers. Both modes use the same input styling; controls wrap only when the available width requires it. The selection is saved per chat and applies only to image generation/editing, including the image tool in ordinary chat. Automatic cycles the enabled image pool; an explicit model cycles only its activated regional replicas. Unavailable saved choices are shown and rejected, never silently replaced.
  • Browser tabs use AI-UI – page title, including automatically updated chat titles, statistics and logs.
  • Documents and images are bound to their chat and are removed together with it (including their embeddings)
  • Settings dialog in the UI (language, deployment defaults, system prompt, temperature, default reasoning effort). Manual mode also exposes endpoints and API versions; Foundry mode shows the resource and discovered endpoint read-only
  • Explicit, staged document reindexing when changing the embedding configuration in either mode, with progress and a cost warning; a failed rebuild leaves the previous index intact
  • User interface available in English and German, switchable in the settings
  • Readiness/connection check: uploads are only possible once storage and the embedding endpoint are verified; checked at start-up and periodically in the background, with a status indicator in the sidebar
  • Credentials exclusively through environment variables: API keys in manual mode, or a tenant/client/client-secret identity in Foundry mode
  • Persistence in SQLite under the mounted data path
  • Single binary, single Docker image (distroless, non-root), designed to run behind a reverse proxy such as Traefik

Screenshots

Captured automatically from the demo instance on every change - no manual editing.

Try it yourself

The same demo the screenshots come from runs locally without any API key:

git clone https://github.com/daknoblo/ai-ui.git
cd ai-ui
go run ./cmd/demo -foundry -separate-images   # http://localhost:8080