One tool to rule them all!
A multi-user FastAPI backend and responsive HTML/Tailwind CSS frontend application designed to provide a chat interface powered by the lollms_client
library. It features integrated Retrieval-Augmented Generation (RAG) using safe_store
, MCPs, Personalities system, multimodal chat, user personalities, a friend system, direct messaging, and enhanced sharing capabilities.
Live Project: https://github.com/ParisNeo/lollms
This project aims to provide a self-hostable, user-friendly chat interface that can connect to various Large Language Models (LLMs) supported by lollms-client
. It features multi-user support with basic authentication, persistent discussions, RAG functionality, multimodal chat (image input), customizable user personalities, a friend system with direct messaging, administrative user management, and sharing of datastores and personalities.
- Multi-User Support: Secure login via Token based authentication. Each user has their own isolated data.
- Persistent Discussions: Chat histories are saved per user (SQLite3 database) and can be revisited, renamed, starred, and deleted.
- LLM Integration: Uses
lollms-client
to interact with various LLM backends. - Streaming Responses: AI responses are streamed for a real-time experience.
- Multimodal Chat: Upload images with text prompts for vision-capable models.
- User Personalities (System Prompts):
- Create, edit, and delete custom personalities (system prompts with name, category, author, icon, etc.).
- Select an active personality to guide LLM responses.
- View and use public (system-provided) personalities.
- Share (send a copy of) owned personalities with friends.
- Retrieval-Augmented Generation (RAG):
- Multiple DataStores per user for organizing RAG documents.
- Upload documents (
.txt
,.pdf
,.docx
,.html
, etc.) to specific DataStores. - Toggle RAG usage per discussion, selecting a specific DataStore.
- Manage DataStores (create, rename, delete) and their indexed documents.
- Share DataStores with friends (read-only query access).
- Friend System & Direct Messaging (DM):
- Send, accept, and reject friend requests.
- View friends list and manage friendships (unfriend, block/unblock - block/unblock WIP).
- Send and receive direct messages with accepted friends.
- View conversation history with friends.
- Configurable Settings:
- Users can set their default LLM model, RAG vectorizer, LLM generation parameters (temperature, top_k, etc.), RAG parameters, and personal profile information.
- Admin Panel:
- Manage users (Add, List, Delete, Reset Password).
- Initial superadmin user created from
config.toml
.
- Data Export/Import: Users can export/import their discussions, settings, and metadata.
- Responsive UI: Built with Tailwind CSS, including image previews, Markdown rendering with code highlighting (Highlight.js) and math (KaTeX).
- Dark/Light Theme & Internationalization (i18n).
- SQLite Backend: Central database for users, settings, personalities, friendships, DMs. SafeStore uses its own DBs per DataStore.
- Backend: FastAPI (Python)
- LLM Communication:
lollms-client
- RAG/Vector Store:
safe_store
(SQLite based per DataStore) - Main Database: SQLAlchemy with SQLite (users, personalities, friendships, DMs, etc.)
- Authentication: HTTP Basic Auth + Passlib
- Frontend: HTML, Tailwind CSS, Vanilla JavaScript
- Configuration: TOML (
config.toml
) - Discussion Storage: YAML files per user
(Add updated screenshots showing the new Friends & Messages modal, DM interface, personality editor, and sharing options)
Login Screen:

Main Chat UI (with Personality Selector & RAG):

Friends & Messages Modal:

Personality Editor Modal:

Settings Modal (User Profile, LLM/RAG Params):

DataStore Management & Sharing:

Admin Panel:

- Python 3.8+
- Git, Pip
- An LLM backend accessible via
lollms-client
.
- Clone:
git clone https://github.com/ParisNeo/lollms_chat.git cd lollms_chat
- Virtual Environment (Recommended):
python -m venv venv # Windows: venv\Scripts\activate # macOS/Linux: source venv/bin/activate
- Install Dependencies:
pip install -r requirements.txt
- Configure
config.toml
:- Copy
config_example.toml
toconfig.toml
. - Crucially: Change
password
under[initial_admin_user]
. - Set
binding_name
anddefault_model_name
in[lollms_client_defaults]
. - Review other settings.
- Copy
- Run:
python main.py
- ** Windows ** execute install.bat
- ** Linux/MazcOs ** execute install.sh
- Access UI:
http://localhost:9642
- Login: Use initial admin or created user credentials.
- Chat: Create/select discussions, use RAG, upload images.
- Personalities: Manage and select active personalities via Settings.
- Friends & DMs: Access via user menu to manage friends and send messages.
- DataStores: Manage RAG DataStores and share them via user menu.
- Settings: Configure user profile, LLM/RAG parameters, active personality.
- Admin Panel:
/admin
for user management (admins only).
[app_settings]
:data_dir
,database_url
.[initial_admin_user]
:username
,password
, optionalfirst_name
,email
.[lollms_client_defaults]
:binding_name
,default_model_name
, LLM parameters,put_thoughts_in_context
.[safe_store_defaults]
: RAG chunking,global_default_vectorizer
.[server]
:host
,port
.
- Swagger UI:
http://localhost:9642/docs
- ReDoc:
http://localhost:9642/redoc
Contributions are welcome! Please open an issue or submit a pull request.
Apache License 2.0. See LICENSE.