Skip to content

Commit b4dcb87

Browse files
committed
docs: Comprehensive documentation overhaul with chat interface prominence
Major improvements to all documentation files: README.md: - Restructured with chat interface as primary feature - Added Quick Start section (3 simple steps) - Improved visual hierarchy with better formatting - Enhanced feature descriptions and examples - Better organized documentation links with tables - Fixed markdown formatting issues docs/cli/README.md (NEW): - Complete CLI documentation overview - Comprehensive command reference table - Prominent chat interface section - Usage examples and common use cases - Proper cross-references to other docs docs/guides/cli.md: - Added chat interface as primary section - Reorganized with better structure - Added dynamic mode switching examples - Improved command documentation - Better visual hierarchy docs/guides/getting-started.md: - Restructured with chat interface focus - Added 3-step quick start process - Improved first-time user experience - Better organized installation instructions - Added 'What's Next' section with examples docs/cli/chat.md: - Enhanced feature descriptions - Better organized with tables and sections - Improved visual formatting - Added comprehensive examples All changes focus on: - Making chat interface the star feature - Improving readability and navigation - Better markdown formatting - Clear step-by-step instructions - Comprehensive cross-references
1 parent 98da426 commit b4dcb87

File tree

5 files changed

+637
-168
lines changed

5 files changed

+637
-168
lines changed

README.md

Lines changed: 139 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -2,44 +2,70 @@
22

33
[![LocalLab Server](https://img.shields.io/pypi/v/locallab.svg?label=locallab&color=blue)](https://pypi.org/project/locallab/) [![LocalLab Client](https://img.shields.io/pypi/v/locallab-client.svg?label=locallab-client&color=green)](https://pypi.org/project/locallab-client/) [![License](https://img.shields.io/badge/license-Apache%202.0-green)](./LICENSE) [![Python](https://img.shields.io/badge/python-3.8%2B-blue)](https://www.python.org/)
44

5-
**Run ChatGPT-like AI on your own computer!** LocalLab is a server that runs AI models locally and makes them accessible from anywhere.
5+
**Run ChatGPT-like AI on your own computer!** LocalLab is a complete AI platform that runs models locally with a powerful chat interface and Python client.
66

7-
## 🤔 What is LocalLab?
7+
## What Makes LocalLab Special?
88

9-
LocalLab is like having your own personal ChatGPT that runs on your computer. Here's how it works:
9+
LocalLab gives you **your own personal ChatGPT** that runs entirely on your computer:
1010

11-
1. **LocalLab Server**: Runs on your computer and loads AI models
12-
2. **Python Client**: A separate package that connects to the server
13-
3. **Access From Anywhere**: Use your AI from any device with the ngrok feature
11+
- 🎯 **Terminal Chat Interface** - ChatGPT-like experience in your terminal
12+
- 🔒 **Complete Privacy** - Your data never leaves your computer
13+
- 💰 **Zero Cost** - No monthly fees or API charges
14+
- 🌐 **Access Anywhere** - Use from any device with ngrok tunneling
15+
-**Multiple Models** - Support for various open-source AI models
16+
- 🎮 **Free GPU** - Run on Google Colab for free GPU acceleration
1417

15-
No complicated setup, no monthly fees, and your data stays private. Perfect for developers, students, researchers, or anyone who wants to experiment with AI.
18+
Perfect for developers, students, researchers, or anyone who wants to experiment with AI without privacy concerns or ongoing costs.
1619

17-
## 🧠 How LocalLab Works (In Simple Terms)
20+
## 🚀 Quick Start (3 Steps)
1821

19-
Think of LocalLab as having two parts:
22+
```bash
23+
# 1. Install LocalLab
24+
pip install locallab locallab-client
25+
26+
# 2. Start your AI server
27+
locallab start
28+
29+
# 3. Chat with your AI
30+
locallab chat
31+
```
32+
33+
That's it! You now have your own ChatGPT running locally.
34+
35+
## 🧠 How LocalLab Works
36+
37+
LocalLab has three main components:
2038

21-
1. **The Server** (what you install with `pip install locallab`)
39+
### 1. 🖥️ **LocalLab Server** (`pip install locallab`)
40+
- Runs AI models on your computer
41+
- Provides a web API for interactions
42+
- Handles model loading and optimization
43+
- Start with: `locallab start`
2244

23-
- This is like a mini-ChatGPT that runs on your computer
24-
- It loads AI models and makes them available through a web server
25-
- You start it with a simple command: `locallab start`
45+
### 2. 💬 **Chat Interface** (Built-in)
46+
- Terminal-based ChatGPT-like experience
47+
- Real-time streaming responses
48+
- Multiple generation modes
49+
- Access with: `locallab chat`
2650

27-
2. **The Client** (what you install with `pip install locallab-client`)
28-
- This is how your Python code talks to the server
29-
- It's a separate package that connects to the server
30-
- You use it in your code with: `client = SyncLocalLabClient("http://localhost:8000")`
51+
### 3. 🐍 **Python Client** (`pip install locallab-client`)
52+
- Programmatic access for your code
53+
- Both sync and async support
54+
- Use with: `client = SyncLocalLabClient("http://localhost:8000")`
3155

3256
```mermaid
3357
graph TD
34-
A[Your Python Code] -->|Uses| B[LocalLab Client Package]
35-
B -->|Connects to| C[LocalLab Server]
58+
A[Terminal Chat] -->|Uses| C[LocalLab Server]
59+
B[Python Code] -->|Uses| C
3660
C -->|Runs| D[AI Models]
37-
C -->|Optional| E[Ngrok for Remote Access]
61+
C -->|Optional| E[Ngrok Tunnel]
62+
E -->|Access from| F[Any Device]
3863
style C fill:#f9f,stroke:#333,stroke-width:2px
3964
style D fill:#bbf,stroke:#333,stroke-width:2px
65+
style A fill:#9f9,stroke:#333,stroke-width:2px
4066
```
4167

42-
**The Magic Part**: With the `--use-ngrok` option, you can access your AI from anywhere - your phone, another computer, or share with friends!
68+
**🌟 The Magic**: Use `--use-ngrok` to access your AI from anywhere - your phone, another computer, or share with friends!
4369

4470
### 🎯 Key Features
4571

@@ -152,46 +178,66 @@ locallab start
152178
locallab start --model microsoft/phi-2 --quantize --quantize-type int8
153179
```
154180

155-
## 💬 CLI Chat Interface
181+
## 💬 Terminal Chat Interface - Your Personal ChatGPT
182+
183+
The **LocalLab Chat Interface** is a powerful terminal-based tool that gives you a ChatGPT-like experience right in your command line. It's the easiest way to interact with your AI models.
184+
185+
### 🎯 Why Use the Chat Interface?
156186

157-
LocalLab includes a powerful terminal-based chat interface that lets you interact with your AI models directly from the command line. Perfect for quick conversations, testing, and interactive AI sessions.
187+
- **Instant AI Access** - No coding required, just type and chat
188+
- **Real-time Responses** - See AI responses as they're generated
189+
- **Rich Formatting** - Markdown rendering with syntax highlighting
190+
- **Smart Features** - History, saving, batch processing, and more
191+
- **Works Everywhere** - Local, remote, or Google Colab
158192

159-
### Quick Start
193+
### 🚀 Getting Started
160194

161195
```bash
162-
# Connect to local server
196+
# Start your server
197+
locallab start
198+
199+
# Open chat interface
163200
locallab chat
201+
```
164202

165-
# Connect to remote server
166-
locallab chat --url https://your-ngrok-url.app
203+
### ✨ Key Features
167204

168-
# Use different generation modes
169-
locallab chat --generate chat # Conversational mode with context
170-
locallab chat --generate batch # Batch processing mode
171-
locallab chat --generate stream # Real-time streaming (default)
172-
```
205+
| Feature | Description | Example |
206+
|---------|-------------|---------|
207+
| **Dynamic Mode Switching** | Change generation mode per message | `Explain AI --stream` |
208+
| **Real-time Streaming** | See responses as they're typed | Live text generation |
209+
| **Conversation History** | Track and save your chats | `/history`, `/save` |
210+
| **Batch Processing** | Process multiple prompts | `/batch` command |
211+
| **Remote Access** | Connect to any LocalLab server | `--url https://your-server.com` |
212+
| **Error Recovery** | Auto-reconnection and graceful handling | Seamless experience |
173213

174-
### Features
214+
### 🎮 Interactive Commands
175215

176-
- **🚀 Multiple Generation Modes**: Stream, Simple, Chat, and Batch processing
177-
- **💬 Rich Terminal UI**: Enhanced markdown rendering and syntax highlighting
178-
- **🔄 Real-time Streaming**: Live response streaming with Server-Sent Events
179-
- **📚 Conversation Management**: History tracking, persistence, and context retention
180-
- **🛠️ Error Handling**: Automatic reconnection and graceful error recovery
181-
- **⚡ Batch Processing**: Process multiple prompts efficiently
216+
```bash
217+
/help # Show all available commands
218+
/history # View conversation history
219+
/save # Save current conversation
220+
/batch # Enter batch processing mode
221+
/reset # Clear conversation history
222+
/exit # Exit gracefully
223+
```
224+
225+
### 🔄 Dynamic Mode Switching (New!)
182226

183-
### Interactive Commands
227+
Override the default generation mode for any message:
184228

185229
```bash
186-
/help - Show available commands
187-
/history - Display conversation history
188-
/batch - Enter batch processing mode
189-
/save - Save conversation to file
190-
/clear - Clear the screen
191-
/exit - Exit gracefully
230+
You: Write a story --stream # Use streaming mode
231+
🔄 Using stream mode for this message
232+
233+
You: Remember my name is Alice --chat # Use chat mode with context
234+
🔄 Using chat mode for this message
235+
236+
You: What's 2+2? --simple # Use simple mode
237+
🔄 Using simple mode for this message
192238
```
193239
194-
### Example Session
240+
### 📱 Example Chat Session
195241
196242
```bash
197243
$ locallab chat
@@ -204,7 +250,7 @@ You: Hello! Can you help me with Python?
204250
AI: Hello! I'd be happy to help you with Python programming.
205251
What specific topic would you like to explore?
206252

207-
You: Show me how to create a class
253+
You: Show me how to create a class --stream
208254

209255
AI: Here's how to create a simple class in Python:
210256
@@ -222,20 +268,39 @@ person = Person("Alice", 25)
222268
print(person.introduce())
223269
```
224270
271+
You: /save
272+
💾 Conversation saved to: chat_2024-07-06_14-30-15.json
273+
225274
You: /exit
226275
👋 Goodbye!
227276
```
228277
229-
> 📖 **Learn More**: See the [CLI Chat Documentation](./docs/cli/chat.md) for complete usage guide and examples.
278+
### 🌐 Remote Access
279+
280+
Connect to any LocalLab server from anywhere:
281+
282+
```bash
283+
# Connect to remote server
284+
locallab chat --url https://abc123.ngrok.app
285+
286+
# Use with Google Colab
287+
locallab chat --url https://your-colab-ngrok-url.app
288+
```
289+
290+
> 📖 **Complete Guide**: See the [Chat Interface Documentation](./docs/cli/chat.md) for advanced features, examples, and troubleshooting.
230291
231-
## 💡 Client Connection & Usage
292+
## 🐍 Python Client - Programmatic Access
232293
233-
After starting your LocalLab server (either locally or on Google Colab), you can connect to it in two ways:
294+
For developers who want to integrate AI into their applications, LocalLab provides a powerful Python client package.
234295
235-
1. **CLI Chat Interface** (above) - For interactive terminal conversations
236-
2. **Python Client Package** (below) - For programmatic access in your code
296+
### 🎯 Two Ways to Use LocalLab
237297
238-
### Synchronous Client Usage (Easier for Beginners)
298+
| Method | Best For | Getting Started |
299+
|--------|----------|-----------------|
300+
| **Chat Interface** | Interactive use, testing, quick questions | `locallab chat` |
301+
| **Python Client** | Applications, scripts, automation | `from locallab_client import SyncLocalLabClient` |
302+
303+
### 📦 Synchronous Client (Recommended for Beginners)
239304
240305
```python
241306
from locallab_client import SyncLocalLabClient
@@ -434,24 +499,26 @@ graph LR
434499

435500
## 📚 Documentation
436501

437-
### Getting Started
438-
439-
1. [Installation Guide](./docs/guides/getting-started.md)
440-
2. [Basic Examples](./docs/guides/examples.md)
441-
3. [CLI Chat Interface](./docs/cli/chat.md)
442-
4. [CLI Usage](./docs/guides/cli.md)
443-
444-
### Advanced Topics
445-
446-
1. [API Reference](./docs/guides/API.md)
447-
2. [Client Libraries](./docs/clients/README.md)
448-
3. [Advanced Features](./docs/guides/advanced.md)
449-
4. [Performance Guide](./docs/features/performance.md)
450-
451-
### Deployment
452-
453-
1. [Local Setup](./docs/deployment/local.md)
454-
2. [Google Colab Guide](./docs/colab/README.md)
502+
### 🚀 Getting Started
503+
| Guide | Description |
504+
|-------|-------------|
505+
| [**Installation & Setup**](./docs/guides/getting-started.md) | Complete installation guide for all platforms |
506+
| [**CLI Overview**](./docs/cli/README.md) | Command-line interface documentation |
507+
| [**Chat Interface**](./docs/cli/chat.md) | Terminal chat features and examples |
508+
509+
### 💻 Using LocalLab
510+
| Guide | Description |
511+
|-------|-------------|
512+
| [**CLI Reference**](./docs/guides/cli.md) | Complete command documentation |
513+
| [**Python Client**](./docs/clients/README.md) | Programmatic access guide |
514+
| [**API Reference**](./docs/guides/API.md) | HTTP API documentation |
515+
516+
### 🌐 Deployment & Advanced
517+
| Guide | Description |
518+
|-------|-------------|
519+
| [**Google Colab Setup**](./docs/colab/README.md) | Free GPU deployment guide |
520+
| [**Troubleshooting**](./docs/guides/troubleshooting.md) | Common issues and solutions |
521+
| [**Advanced Features**](./docs/guides/advanced.md) | Power user features |
455522

456523
## 🔍 Need Help?
457524

0 commit comments

Comments
 (0)