Moonweb: LLM Chat Tool
Welcome to Moonweb, a web chat tool developed with Rust, Dioxus, and Candle frameworks that supports a variety of open-source Large Language Models (LLMs). This project aims to provide a dynamic and flexible platform for integrating and testing different LLMs.
Features
The model services that have been implemented are as follows:
Quick Start
git clone https://github.com/ Lyn-liyuan/moonweb.git
cd moonweb
cargo build
If you want to use the load command to start model services in the models directory, you need to compile these services first. Navigate to the directories containing the Cargo.toml files and execute cargo build --release to compile these services. After the compilation is complete, set the program in the server.config file to the executable file of the compiled model service.
Before compiling the pyworker model service, you need to specify the Python interpreter used by the Python code via the environment variable PYO3_PYTHON. You can activate the Python environment with conda activate my_env and set the environment variable using export PYO3_PYTHON=$(which python).
cargo run –-release -- --server master
dx build --release
Architecture Overview
Model Integration
To integrate a new LLM model, follow these steps:
Update Records - June 25, 2024: Implement dynamic loading of model services. The model service can be an independent program. As long as it complies with the IPC communication specification, the service can be started through the /load model_id command on the web page. - July 2, 2024: Added qwen2 model, supported python as model service, and implemented Qwen/Qwen-7B-Instruct model service with python. - July 4, 2024: Implement the /unload command to stop the model service process. For example, enter /unload Qwen/Qwen2-1.5B-Instruct in the text box of the web interface to stop the corresponding model process. - July 6, 2024: To start the HTTP server using axum, you no longer need to use dx serve to start the server. Use the highlight.js library to add syntax highlighting functionality. - July 11, 2024: To implement the llava model server. - July 19, 2024: Added conversation management, using the browser local storage to store historical conversations. - July 23, 2024: Remove temperature and top_p configuration from the configuration dialog, so that each session can configure its own system prompts. - July 29, 2024: Implemented user login and the function of deleting conversations. - Aug 4, 2024: Implemented the black-forest-labs/FLUX.1-schnell model service. FLUX.1 [schnell] is a 12 billion parameter rectified flow transformer capable of generating images from text descriptions.
Contributing
We welcome contributions in any form, including but not limited to:
License
This project is licensed under the "MIT License".
Contact
$ claude mcp add moonweb \
-- python -m otcore.mcp_server <graph>