LLM-Notebook is a powerful and user-friendly interface for interacting with large language models through OpenRouter's API. It provides a collaborative writing space with real-time token counting, customizable sampling parameters, and an intuitive interface for managing your writing sessions.
The goal is to reproduce the functionality of text-generation-webui's notebook in a lightweight, simple package, using an online API service rather than self-hosting the models.
This project is in early development. A native Android app with identical functionality is also in the works (https://github.com/Mithadon/LLM-Notebook-Android).
- Collaborative Writing Space: A clean, distraction-free interface for writing and generating text together with LLMs
- Real-time Token Counter: Keep track of your token usage as you write
- Multiple Model Support: Access various language models through OpenRouter's API
- Customizable Parameters: Fine-tune generation with temperature, top-p, min-p, top-k, and max tokens
- Preset Management: Save and load your favorite parameter configurations
- Export Functionality: Export your writing sessions with timestamps and token counts
- Theme Options: Choose between light, dark, or default themes
- Advanced Settings: Configure port, authentication, and other system settings
- Python 3.7+
- OpenRouter API key
- Required Python packages:
- gradio
- requests
- tiktoken
- Clone the repository:
git clone https://github.com/Mithadon/LLM-Notebook.git
cd LLM-Notebook
- Install required packages:
pip install gradio requests tiktoken
- Get an OpenRouter API key:
- Visit OpenRouter
- Sign up for an account
- Navigate to your dashboard
- Generate an API key
-
Run the application:
- On Windows: Double-click
run-windows.bat
- On Linux/Mac: Execute
./run-linux.sh
- On Windows: Double-click
-
Open your web browser and navigate to
http://localhost:7860
(or your configured port) -
On first run, the application will create a
user_settings.json
file. Input your OpenRouter API key in the Settings tab. -
Start writing in the Notebook tab and use the "Continue Writing" button to generate text
The application automatically creates a user_settings.json
file on first run with default settings. You can modify:
- Port number
- Default model
- Theme
- API key
- Authentication settings
- Browser launch preferences
None
Contributions are welcome! Please feel free to submit a Pull Request.