forked from oceanbase/powermem
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathenv.example
More file actions
233 lines (203 loc) · 7.58 KB
/
env.example
File metadata and controls
233 lines (203 loc) · 7.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
# =============================================================================
# PowerMem Configuration Template
# =============================================================================
# Copy this file to .env and modify the values according to your needs
#
# Database Providers: sqlite, oceanbase, postgres
# LLM Providers: qwen, openai, mock
# Embedding Providers: qwen, openai, mock
# =============================================================================
# =============================================================================
# Database Configuration
# =============================================================================
# Choose your database provider: sqlite, oceanbase, postgres
DATABASE_PROVIDER=sqlite
# SQLite Configuration (when DATABASE_PROVIDER=sqlite)
DATABASE_PATH=./data/powermem_dev.db
DATABASE_ENABLE_WAL=true
DATABASE_TIMEOUT=30
# OceanBase Configuration (when DATABASE_PROVIDER=oceanbase)
# Connection settings
DATABASE_HOST=localhost
DATABASE_PORT=2881
DATABASE_USER=root
DATABASE_PASSWORD=password
DATABASE_NAME=powermem
# Collection and index settings
DATABASE_COLLECTION_NAME=memories
DATABASE_INDEX_TYPE=IVF_FLAT
DATABASE_VECTOR_METRIC_TYPE=cosine
DATABASE_TEXT_FIELD=document
DATABASE_VECTOR_FIELD=embedding
# Vector dimensions (must match embedding model dimensions)
DATABASE_EMBEDDING_MODEL_DIMS=1536
DATABASE_PRIMARY_FIELD=id
DATABASE_METADATA_FIELD=metadata
DATABASE_VIDX_NAME=memories_vidx
# =============================================================================
# LLM Configuration
# =============================================================================
# Choose your LLM provider: qwen, openai, mock
LLM_PROVIDER=qwen
# Unified LLM Configuration (works for all providers)
LLM_API_KEY=your_api_key_here
LLM_MODEL=qwen-plus
LLM_BASE_URL=https://dashscope.aliyuncs.com/api/v1
LLM_TEMPERATURE=0.7
LLM_MAX_TOKENS=1000
LLM_TOP_P=0.8
LLM_TOP_K=50
LLM_ENABLE_SEARCH=false
# =============================================================================
# Embedding Configuration
# =============================================================================
# Choose your embedding provider: qwen, openai, mock
EMBEDDING_PROVIDER=qwen
# Unified Embedding Configuration (works for all providers)
EMBEDDING_API_KEY=your_api_key_here
EMBEDDING_MODEL=text-embedding-v4
EMBEDDING_DIMS=1536
EMBEDDING_BASE_URL=https://dashscope.aliyuncs.com/api/v1
# =============================================================================
# Agent Configuration
# =============================================================================
# Agent memory management settings
AGENT_ENABLED=true
AGENT_DEFAULT_SCOPE=AGENT
AGENT_DEFAULT_PRIVACY_LEVEL=PRIVATE
AGENT_DEFAULT_COLLABORATION_LEVEL=READ_ONLY
AGENT_DEFAULT_ACCESS_PERMISSION=OWNER_ONLY
# Agent Memory Mode (auto, multi_agent, multi_user, hybrid)
AGENT_MEMORY_MODE=auto
# =============================================================================
# Intelligent Memory Configuration
# =============================================================================
# Ebbinghaus forgetting curve settings
INTELLIGENT_MEMORY_ENABLED=true
INTELLIGENT_MEMORY_INITIAL_RETENTION=1.0
INTELLIGENT_MEMORY_DECAY_RATE=0.1
INTELLIGENT_MEMORY_REINFORCEMENT_FACTOR=0.3
INTELLIGENT_MEMORY_WORKING_THRESHOLD=0.3
INTELLIGENT_MEMORY_SHORT_TERM_THRESHOLD=0.6
INTELLIGENT_MEMORY_LONG_TERM_THRESHOLD=0.8
# Memory decay calculation settings
MEMORY_DECAY_ENABLED=true
MEMORY_DECAY_ALGORITHM=ebbinghaus
MEMORY_DECAY_BASE_RETENTION=1.0
MEMORY_DECAY_FORGETTING_RATE=0.1
MEMORY_DECAY_REINFORCEMENT_FACTOR=0.3
# =============================================================================
# Performance Configuration
# =============================================================================
# Memory management settings
MEMORY_BATCH_SIZE=100
MEMORY_CACHE_SIZE=1000
MEMORY_CACHE_TTL=3600
MEMORY_SEARCH_LIMIT=10
MEMORY_SEARCH_THRESHOLD=0.7
# Vector store settings
VECTOR_STORE_BATCH_SIZE=50
VECTOR_STORE_CACHE_SIZE=500
VECTOR_STORE_INDEX_REBUILD_INTERVAL=86400
# =============================================================================
# Security Configuration
# =============================================================================
# Encryption settings
ENCRYPTION_ENABLED=false
ENCRYPTION_KEY=
ENCRYPTION_ALGORITHM=AES-256-GCM
# Access control settings
ACCESS_CONTROL_ENABLED=true
ACCESS_CONTROL_DEFAULT_PERMISSION=READ_ONLY
ACCESS_CONTROL_ADMIN_USERS=admin,root
# =============================================================================
# Telemetry Configuration
# =============================================================================
# Usage analytics and monitoring
TELEMETRY_ENABLED=false
TELEMETRY_ENDPOINT=https://telemetry.powermem.ai
TELEMETRY_API_KEY=
TELEMETRY_BATCH_SIZE=100
TELEMETRY_FLUSH_INTERVAL=30
TELEMETRY_RETENTION_DAYS=30
# =============================================================================
# Audit Configuration
# =============================================================================
# Audit logging settings
AUDIT_ENABLED=true
AUDIT_LOG_FILE=./logs/audit.log
AUDIT_LOG_LEVEL=INFO
AUDIT_RETENTION_DAYS=90
AUDIT_COMPRESS_LOGS=true
AUDIT_LOG_ROTATION_SIZE=100MB
# =============================================================================
# Logging Configuration
# =============================================================================
# General logging settings
LOGGING_LEVEL=DEBUG
LOGGING_FORMAT=%(asctime)s - %(name)s - %(levelname)s - %(message)s
LOGGING_FILE=./logs/powermem.log
LOGGING_MAX_SIZE=100MB
LOGGING_BACKUP_COUNT=5
LOGGING_COMPRESS_BACKUPS=true
# Console logging
LOGGING_CONSOLE_ENABLED=true
LOGGING_CONSOLE_LEVEL=INFO
LOGGING_CONSOLE_FORMAT=%(levelname)s - %(message)s
# =============================================================================
# Development Configuration
# =============================================================================
# Development and testing settings
DEV_MODE=false
DEV_MOCK_LLM=false
DEV_MOCK_EMBEDDING=false
DEV_DEBUG_MODE=false
DEV_PROFILING_ENABLED=false
# Test database settings
TEST_DATABASE_PROVIDER=sqlite
TEST_DATABASE_PATH=./data/test_powermem.db
TEST_DATABASE_CLEANUP=true
# =============================================================================
# Example Configurations
# =============================================================================
# Uncomment and modify the following sections for different use cases
# # SQLite Development Configuration
# DATABASE_PROVIDER=sqlite
# DATABASE_PATH=./data/powermem_dev.db
# LLM_PROVIDER=qwen
# LLM_API_KEY=your_api_key_here
# LLM_MODEL=qwen-plus
# EMBEDDING_PROVIDER=qwen
# EMBEDDING_API_KEY=your_api_key_here
# EMBEDDING_MODEL=text-embedding-v4
# # OceanBase Production Configuration
# DATABASE_PROVIDER=oceanbase
# DATABASE_HOST=your-oceanbase-host
# DATABASE_PORT=2881
# DATABASE_USER=your-username
# DATABASE_PASSWORD=your-password
# DATABASE_NAME=powermem_prod
# DATABASE_COLLECTION_NAME=memories
# DATABASE_INDEX_TYPE=IVF_FLAT
# DATABASE_VECTOR_METRIC_TYPE=cosine
# DATABASE_TEXT_FIELD=document
# DATABASE_VECTOR_FIELD=embedding
# DATABASE_EMBEDDING_MODEL_DIMS=1536
# DATABASE_PRIMARY_FIELD=id
# DATABASE_METADATA_FIELD=metadata
# DATABASE_VIDX_NAME=memories_vidx
# LLM_PROVIDER=qwen
# LLM_API_KEY=your_api_key_here
# LLM_MODEL=qwen-long
# EMBEDDING_PROVIDER=qwen
# EMBEDDING_API_KEY=your_api_key_here
# EMBEDDING_MODEL=text-embedding-v4
# # OpenAI Configuration
# LLM_PROVIDER=openai
# LLM_API_KEY=your-openai-api-key
# LLM_MODEL=gpt-4
# LLM_BASE_URL=https://api.openai.com/v1
# EMBEDDING_PROVIDER=openai
# EMBEDDING_API_KEY=your-openai-api-key
# EMBEDDING_MODEL=text-embedding-ada-002
# EMBEDDING_BASE_URL=https://api.openai.com/v1