docs: add temporaryChatRetention configuration documentation (#334)

This commit is contained in:
Rakshit
2025-07-07 22:54:56 +05:30
committed by GitHub
parent cb9eaf239b
commit 6f9668db68

View File

@@ -325,11 +325,59 @@ see also:
['bookmarks', 'Boolean', 'Enables or disables all bookmarks-related features for all users', ''],
['multiConvo', 'Boolean', 'Enables or disables all "multi convo", AKA multiple response streaming, related features for all users', ''],
['agents', 'Boolean', 'Enables or disables all agents features for all users', ''],
['temporaryChatRetention', 'Number', 'Configures the retention period for temporary chats in hours. Min: 1, Max: 8760. Default: 720 (30 days).', 'temporaryChatRetention: 168'],
]}
/>
see: [Interface Object Structure](/docs/configuration/librechat_yaml/object_structure/interface)
## temporaryChatRetention
The `temporaryChatRetention` configuration allows you to customize how long temporary chats are retained before being automatically deleted. This setting applies to all temporary conversations created by users and provides flexible control over data retention policies.
**Configuration Options:**
<OptionTable
options={[
['temporaryChatRetention', 'Number', 'Sets the retention period for temporary chats in hours.', 'temporaryChatRetention: 168'],
]}
/>
**Validation Rules:**
- **Minimum**: 1 hour (prevents immediate deletion)
- **Maximum**: 8760 hours (1 year maximum retention)
- **Default**: 720 hours (30 days)
**Configuration Methods:**
1. **Environment Variable**: `TEMP_CHAT_RETENTION_HOURS=168`
2. **LibreChat.yaml**: `interface.temporaryChatRetention: 168`
3. **Priority**: Config file takes precedence over environment variable
**Example Configuration:**
```yaml filename="temporaryChatRetention"
interface:
# Retain temporary chats for 7 days (168 hours)
temporaryChatRetention: 168
```
**Common Retention Periods:**
- **1 hour**: `temporaryChatRetention: 1` (minimal retention)
- **24 hours**: `temporaryChatRetention: 24` (1 day)
- **168 hours**: `temporaryChatRetention: 168` (1 week)
- **720 hours**: `temporaryChatRetention: 720` (30 days - default)
- **8760 hours**: `temporaryChatRetention: 8760` (1 year - maximum)
**Important Notes:**
- Automatic cleanup occurs via MongoDB TTL (Time To Live) indexes
- Changes apply only to newly created temporary chats
- Existing temporary chats retain their original expiration dates
- Invalid values automatically fallback to the default (720 hours)
- Setting too low values may impact user experience with temporary chats
- This setting only affects temporary chats, not regular conversations
## modelSpecs
**Key:**