Skip to main content

aiaio (AI-AI-O)

A lightweight, privacy-focused web UI for interacting with AI models. Supports both local and remote LLM deployments through OpenAI-compatible APIs.

Screenshot

Features

  • 🌓 Dark/Light mode support
  • 💾 Local SQLite database for conversation storage
  • 📁 File upload and processing (images, documents, etc.)
  • ⚙️ Configurable model parameters through UI
  • 🔒 Privacy-focused (all data stays local)
  • 📱 Responsive design for mobile/desktop
  • 🎨 Syntax highlighting for code blocks
  • 📋 One-click code block copying
  • 🔄 Real-time conversation updates
  • 📝 Automatic conversation summarization
  • 🎯 Customizable system prompts
  • 🌐 WebSocket support for real-time updates
  • 📦 Docker support for easy deploymen
  • 📦 Multiple API endpoint support
  • 📦 Multiple system prompt support

Requirements

  • Python 3.10+
  • An OpenAI-compatible API endpoint (local or remote)

Supported API Endpoints

aiaio works with any OpenAI-compatible API endpoint, including:

  • OpenAI API
  • vLLM
  • Text Generation Inference (TGI)
  • Hugging Face Inference Endpoints
  • llama.cpp server
  • LocalAI
  • Custom OpenAI-compatible APIs

For example, you can serve llama 8b using vLLM using:

vllm serve Meta-Llama-3.1-8B-Instruct.Q4_K_M.gguf --tokenizer meta-llama/Llama-3.1-8B-Instruct --max_model_len 125000

and once the api is running, you can access it using aiaio ui.

Installation

Using pip

pip install aiaio

From source

git clone https://github.com/abhishekkrthakur/aiaio.git
cd aiaio
pip install -e .

Quick Start

  1. Start the server:
aiaio app --host 127.0.0.1 --port 5000
  1. Open your browser and navigate to http://127.0.0.1:5000

  2. Configure your API endpoint and model settings in the UI

Docker Usage

  1. Build the Docker image:
docker build -t aiaio .
  1. Run the container:
docker run --network host \
  -v /path/to/data:/data \
  aiaio

The /data volume mount is optional but recommended for persistent storage of the SQLite database and uploaded files.

UI Configuration

All model and API settings can be configured through the UI:

Model Parameters

  • Temperature (0-2): Controls response randomness. Higher values make output more creative but less focused
  • Max Tokens (1-32k): Maximum length of generated responses
  • Top P (0-1): Controls diversity via nucleus sampling. Lower values make output more focused
  • Model Name: Name/path of the model to use (depends on your API endpoint)

API Configuration

  • Host: URL of your OpenAI-compatible API endpoint
  • API Key: Authentication key if required by your endpoint

These settings are stored in the local SQLite database and persist between sessions.

File Handling

aiaio supports uploading and processing various file types, depending on the model's capabilities:

  • Images (PNG, JPG, GIF, etc.)
  • Documents (PDF, DOC, DOCX)
  • Text files (TXT, CSV, JSON)
  • Audio files (depends on model capabilities)
  • Video files (depends on model capabilities)

Uploaded files are stored temporarily and can be referenced in conversations.

Database Schema

aiaio uses SQLite for storage with the following main tables:

  • conversations: Stores chat histories and summaries
  • messages: Stores individual messages within conversations
  • attachments: Stores file attachment metadata
  • settings: Stores UI and model configuration

Advanced Usage

Custom System Prompts

Each conversation can have its own system prompt that guides the AI's behavior. Click the "System Prompt" section above the chat to customize it.

Conversation Management

  • Create new conversations using the "+ New Chat" button
  • Switch between conversations in the left sidebar
  • Delete conversations using the trash icon
  • View conversation summaries in the sidebar

Keyboard Shortcuts

  • Ctrl/Cmd + Enter: Send message
  • Esc: Clear input
  • Ctrl/Cmd + K: Focus chat input
  • Ctrl/Cmd + /: Toggle settings sidebar

Development

# Clone the repository
git clone https://github.com/abhishekkrthakur/aiaio.git
cd aiaio

# Create a virtual environment
python -m venv venv
source venv/bin/activate  # or `venv\Scripts\activate` on Windows

# Install development dependencies
pip install -e ".[dev]"

# Run tests
pytest

# Run with auto-reload for development
uvicorn aiaio.app.app:app --reload --port 5000

Contributing

Contributions are welcome! Please:

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Run the tests (pytest)
  5. Submit a pull request

License

Apache License 2.0 - see LICENSE file for details

Acknowledgements

This project was primarily written with GitHub Copilot's assistance. While the human guided the development, Copilot generated much of the actual code.

Release files for aiaio 0.0.9

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for aiaio 0.0.9
File Size Uploaded
aiaio-0.0.9.tar.gz 47.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for aiaio 0.0.9
File Interpreter ABI Platform
aiaio-0.0.9-py3-none-any.whl Python 3 none any Details

Total release size: 94.2 kB

Release files / aiaio-0.0.9.tar.gz

Download URL aiaio-0.0.9.tar.gz
Size 47.4 kB
Tags Source
SHA-256 checksum
How to use checksums
21d853d3a95baaa8749b26466e9164f81eacb9e2a061b458dfb8b027ca87645a
BLAKE2b-256 checksum
How to use checksums
2164dba9847dc6eb7ca121c410045069ac36c544668c675382b548726891c984
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.16

Release files / aiaio-0.0.9-py3-none-any.whl

Download URL aiaio-0.0.9-py3-none-any.whl
Size 46.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b587b55b156ad34976389bb3e2f16785607f1e2fab7b7518c9554360311cf243
BLAKE2b-256 checksum
How to use checksums
e68e73f62f81178b2f3b9fe8622d511f5d79f9fe9d160e6a5fea01c9893e19a9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.16

Release history Release notifications | RSS feed

This release

0.0.9 This release

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page