Skip to content

Commit 4fc3056

Browse files
update docs
1 parent 8c58055 commit 4fc3056

File tree

1 file changed

+41
-6
lines changed

1 file changed

+41
-6
lines changed

readme.md

Lines changed: 41 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,19 @@ It helps boost productivity for anyone who writes repetitive messages, needs qui
1919
- 💬 **Four AI Reply Suggestions per Message** – Get up to 4 context-aware replies instantly for any message in Smart Reply mode (available in both extension and web).
2020
- ✍️ **Four AI Text Enhancements** – Improve your own text with 4 variations focusing on grammar, clarity, conciseness, structure, and effectiveness in Smart Enhance mode (like Grammarly; available in both extension and web).
2121
- 🌐 **Four AI Text Translations** – Translate text to multiple languages (e.g., English, Spanish, French, German, Chinese, Arabic, Bengali) with 4 variations in customizable styles in Smart Translate mode (available in both extension and web).
22-
- 🎨 **Customizable Style** – Choose from Professional, Friendly, Humorous, or Concise styles with tooltips for descriptions (applies to Reply, Enhance, and Translate modes).
22+
- 🎨 **Six Response Formats** – Choose from **Professional**, **Friendly**, **Casual**, **Formal**, **Flating** (flirty compliments with romantic interest), or **Romantic** (affectionate and emotionally warm) with tooltips for descriptions (applies to Reply, Enhance, and Translate modes).
2323
- 🔄 **Mode Switching** – Easily toggle between Smart Reply, Smart Enhance, and Smart Translate in the extension popup or web interface.
24+
- 🤖 **Multiple Free LLM Models** – Automatically selects optimized models for each operation:
25+
- Suggestions: `xiaomi/mimo-v2-flash:free`, `tngtech/deepseek-r1t2-chimera:free`, `openai/gpt-oss-20b:free`
26+
- Enhancements: `tngtech/deepseek-r1t2-chimera:free`, `xiaomi/mimo-v2-flash:free`, `openai/gpt-oss-20b:free`
27+
- Translations: `openai/gpt-oss-20b:free`, `xiaomi/mimo-v2-flash:free`, `tngtech/deepseek-r1t2-chimera:free`
2428
- ⚙️ **LLM Agnostic** – Works with any OpenRouter-supported model (free or paid).
29+
- 💾 **Intelligent Caching** – SHA256-based cache keys prevent duplicate responses for different requests (5-minute TTL).
2530
- 🔐 **Custom API Keys** – Bring your own API key for privacy & flexibility.
2631
- 🐳 **Docker Support** – Run the backend instantly using Docker.
2732
- **Extension-Specific**: Insert suggestions/translations directly into text fields (e.g., emails, chats); auto-detect selected text; keyboard shortcut (Ctrl+Shift+T) and context menu for quick in-page translation using default languages; cross-browser support for Chrome and Firefox.
28-
- **Web-Specific**: Auto-resizing textarea, animated UI with Framer Motion, developer info panel, keyboard shortcuts (Ctrl/Cmd + Enter), responsive design, and accessibility features.
33+
- **Web-Specific**: Auto-resizing textarea, animated UI with Framer Motion, developer info panel, keyboard shortcuts (Ctrl/Cmd + Enter), responsive design, and accessibility features.
34+
- **Mobile-Specific** (Flutter): Native Android support, responsive UI, optimized for on-the-go usage.
2935

3036
---
3137

@@ -39,17 +45,20 @@ It helps boost productivity for anyone who writes repetitive messages, needs qui
3945

4046
---
4147

42-
## Expected Performance Improvements v0.3
48+
## Expected Performance Improvements v0.4
4349

4450
| Metric | Before | After | Improvement |
4551
|--------|--------|-------|-------------|
4652
| Response Size | 100% | 30-35% | **65-70% reduction** |
4753
| API Cache Hits | 0% | ~60% | **Significant latency reduction** |
54+
| Cache Key Collision | High | 0% | **SHA256 hashing eliminates duplicates** |
4855
| React Re-renders | High | Low | **40-50% fewer renders** |
4956
| Bundle Size | 100% | 85-88% | **12-15% reduction** |
5057
| Request Cancellation ||| **Prevents zombie requests** |
5158
| Security Headers ||| **XSS/Clickjacking protection** |
5259
| Input Validation | Basic | Strict | **Injection attack prevention** |
60+
| Model Optimization | Single | Multiple | **Best model per operation** |
61+
| Romantic Replies ||| **New format support** |
5362

5463
---
5564

@@ -184,7 +193,7 @@ cd smart-reply
184193
```json
185194
{
186195
"message": "Can we reschedule the meeting?",
187-
"style": "professional"
196+
"format": "professional"
188197
}
189198
```
190199

@@ -201,12 +210,14 @@ cd smart-reply
201210
}
202211
```
203212

213+
**Supported Formats:** `professional`, `friendly`, `casual`, `formal`, `flating`, `romantic`
214+
204215
* **POST /api/enhance-text** – Generate multiple enhanced versions of text (Smart Enhance mode)
205216

206217
```json
207218
{
208219
"text": "We need to reschedul the meeting because of conflict.",
209-
"style": "professional"
220+
"format": "professional"
210221
}
211222
```
212223

@@ -223,12 +234,14 @@ cd smart-reply
223234
}
224235
```
225236

237+
**Supported Formats:** `professional`, `friendly`, `casual`, `formal`, `flating`, `romantic`
238+
226239
* **POST /api/translate-text** – Generate multiple translated versions of text (Smart Translate mode)
227240

228241
```json
229242
{
230243
"text": "Hello, how are you?",
231-
"style": "friendly",
244+
"format": "friendly",
232245
"language": "bengali"
233246
}
234247
```
@@ -246,8 +259,30 @@ cd smart-reply
246259
}
247260
```
248261

262+
**Supported Formats:** `professional`, `friendly`, `casual`, `formal`, `flating`, `romantic`
263+
249264
* **GET /health** – Health check endpoint returning `{ "status": "ok" }`.
250265

266+
---
267+
268+
## 🔧 Caching System (v0.4)
269+
270+
Smart Reply now uses an intelligent SHA256-based caching system:
271+
272+
- **Cache Key:** Full prompt + model hash (prevents collisions)
273+
- **TTL:** 5 minutes per entry
274+
- **Benefits:**
275+
- No more duplicate responses for different messages
276+
- Faster subsequent identical requests
277+
- Automatic expiration and cleanup
278+
- Statistics available via cache manager
279+
280+
Example cache behavior:
281+
```
282+
Request 1: "Hello" → Cache Miss → OpenRouter API → Cached
283+
Request 2: "Hi" → Cache Miss → OpenRouter API → Cached (different prompt!)
284+
Request 1 (repeat): "Hello" → Cache Hit → Instant Response
285+
```
251286

252287
---
253288

0 commit comments

Comments
 (0)