Skip to content

Commit 0c4399b

Browse files
author
SMKRV
committed
feat(performance): Optimize system resources and token estimation
- Improve JSON history file processing - Add memory and disk space validation - Enhance parallel request handling - Refine token counting heuristics
1 parent c13ef19 commit 0c4399b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ Transform your smart home experience with powerful AI assistance powered by mult
106106
- 🔑 **API Key**: Provider-specific authentication
107107
- 🤖 **Model Selection**: Flexible, provider-specific models
108108
- 🌡️ **Temperature**: Creativity control (0.0-2.0)
109-
- 📏 **Max Tokens**: Response length limit
109+
- 📏 **Max Tokens**: Response length limit (token usage is estimated using a heuristic method based on word count and specific word characteristics, which may differ from actual token usage)
110110
- ⏱️ **Request Interval**: API call throttling
111111
- 💾 **History Size**: Number of messages to retain
112112
- 🌍 **Custom API Endpoint**: Optional advanced configuration
@@ -318,7 +318,7 @@ automation:
318318
- 🤖 **Model and Provider Information**: Tracking current AI model and service provider
319319
- 🚦 **System Status**: Real-time API and processing readiness
320320
- 📊 **Performance Metrics**: Request success rates and response times
321-
- 💬 **Conversation Tracking**: Token usage and interaction history (for more precise token counting, install `tiktoken`; otherwise, a fallback estimation method is automatically used)
321+
- 💬 **Conversation Tracking**: Token usage and interaction history are estimated using a heuristic method based on word count and specific word characteristics, which may differ from actual token usage.
322322
- 🕒 **Last Interaction Details**: Recent query and response tracking
323323
- ❤️ **System Health**: Error monitoring and service uptime
324324

@@ -414,7 +414,7 @@ automation:
414414

415415
### History Storage
416416
Conversation history stored in `.storage/ha_text_ai_history/` directory:
417-
- Each instance has its own history file
417+
- Each instance has its own history file (JSON)
418418
- Files are automatically rotated when size limit is reached
419419
- Archived history files are timestamped
420420
- Default maximum file size: 1MB

0 commit comments

Comments
 (0)