mem-llm 1.0.5__tar.gz → 1.0.7__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of mem-llm might be problematic. Click here for more details.
- mem_llm-1.0.7/CHANGELOG.md +73 -0
- {mem_llm-1.0.5/mem_llm.egg-info → mem_llm-1.0.7}/PKG-INFO +1 -1
- {mem_llm-1.0.5 → mem_llm-1.0.7}/mem_llm/__init__.py +1 -1
- {mem_llm-1.0.5 → mem_llm-1.0.7}/mem_llm/mem_agent.py +81 -24
- {mem_llm-1.0.5 → mem_llm-1.0.7}/mem_llm/memory_manager.py +50 -0
- {mem_llm-1.0.5 → mem_llm-1.0.7/mem_llm.egg-info}/PKG-INFO +1 -1
- {mem_llm-1.0.5 → mem_llm-1.0.7}/setup.py +1 -1
- mem_llm-1.0.5/CHANGELOG.md +0 -237
- {mem_llm-1.0.5 → mem_llm-1.0.7}/INTEGRATION_GUIDE.md +0 -0
- {mem_llm-1.0.5 → mem_llm-1.0.7}/MANIFEST.in +0 -0
- {mem_llm-1.0.5 → mem_llm-1.0.7}/QUICKSTART.md +0 -0
- {mem_llm-1.0.5 → mem_llm-1.0.7}/QUICKSTART_TR.md +0 -0
- {mem_llm-1.0.5 → mem_llm-1.0.7}/README.md +0 -0
- {mem_llm-1.0.5 → mem_llm-1.0.7}/STRUCTURE.md +0 -0
- {mem_llm-1.0.5 → mem_llm-1.0.7}/docs/CONFIG_GUIDE.md +0 -0
- {mem_llm-1.0.5 → mem_llm-1.0.7}/docs/INDEX.md +0 -0
- {mem_llm-1.0.5 → mem_llm-1.0.7}/docs/README.md +0 -0
- {mem_llm-1.0.5 → mem_llm-1.0.7}/mem_llm/config.yaml.example +0 -0
- {mem_llm-1.0.5 → mem_llm-1.0.7}/mem_llm/config_from_docs.py +0 -0
- {mem_llm-1.0.5 → mem_llm-1.0.7}/mem_llm/config_manager.py +0 -0
- {mem_llm-1.0.5 → mem_llm-1.0.7}/mem_llm/knowledge_loader.py +0 -0
- {mem_llm-1.0.5 → mem_llm-1.0.7}/mem_llm/llm_client.py +0 -0
- {mem_llm-1.0.5 → mem_llm-1.0.7}/mem_llm/memory_db.py +0 -0
- {mem_llm-1.0.5 → mem_llm-1.0.7}/mem_llm/memory_tools.py +0 -0
- {mem_llm-1.0.5 → mem_llm-1.0.7}/mem_llm/prompt_templates.py +0 -0
- {mem_llm-1.0.5 → mem_llm-1.0.7}/mem_llm.egg-info/SOURCES.txt +0 -0
- {mem_llm-1.0.5 → mem_llm-1.0.7}/mem_llm.egg-info/dependency_links.txt +0 -0
- {mem_llm-1.0.5 → mem_llm-1.0.7}/mem_llm.egg-info/requires.txt +0 -0
- {mem_llm-1.0.5 → mem_llm-1.0.7}/mem_llm.egg-info/top_level.txt +0 -0
- {mem_llm-1.0.5 → mem_llm-1.0.7}/requirements.txt +0 -0
- {mem_llm-1.0.5 → mem_llm-1.0.7}/setup.cfg +0 -0
- {mem_llm-1.0.5 → mem_llm-1.0.7}/tests/test_integration.py +0 -0
- {mem_llm-1.0.5 → mem_llm-1.0.7}/tests/test_llm_client.py +0 -0
- {mem_llm-1.0.5 → mem_llm-1.0.7}/tests/test_mem_agent.py +0 -0
- {mem_llm-1.0.5 → mem_llm-1.0.7}/tests/test_memory_manager.py +0 -0
- {mem_llm-1.0.5 → mem_llm-1.0.7}/tests/test_memory_tools.py +0 -0
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
## [1.0.4] - 2025-10-13
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
- ✨ Config-free knowledge base support - KB now works without config.yaml
|
|
9
|
+
- ✨ Smart keyword extraction for knowledge base search (Turkish & English stopwords)
|
|
10
|
+
- ✨ Enhanced KB context injection - KB data injected directly into user message
|
|
11
|
+
- ✨ Automatic user profile extraction (name, favorite_food, location)
|
|
12
|
+
- ✨ Turkish language support for profile extraction
|
|
13
|
+
- ✨ SQL-JSON memory compatibility methods (`update_user_profile`, `add_user`, `get_statistics` in MemoryManager)
|
|
14
|
+
- 📚 New example: `example_knowledge_base.py`
|
|
15
|
+
- 🧪 Comprehensive test suite: `comprehensive_test.py`
|
|
16
|
+
|
|
17
|
+
### Fixed
|
|
18
|
+
- 🐛 Knowledge base not being used without config.yaml
|
|
19
|
+
- 🐛 LLM ignoring knowledge base information
|
|
20
|
+
- 🐛 User profiles returning empty dictionaries
|
|
21
|
+
- 🐛 Profile updates not working correctly with SQL memory
|
|
22
|
+
- 🐛 Keyword search failing with Turkish queries
|
|
23
|
+
- 🐛 Preferences not being parsed from SQL storage
|
|
24
|
+
|
|
25
|
+
### Improved
|
|
26
|
+
- ⚡ Better KB-first response priority in system prompts
|
|
27
|
+
- ⚡ More accurate answers from knowledge base
|
|
28
|
+
- ⚡ Stronger instruction for using KB data
|
|
29
|
+
- ⚡ Enhanced search algorithm with stopword filtering
|
|
30
|
+
- 📖 Better documentation and examples
|
|
31
|
+
|
|
32
|
+
### Changed
|
|
33
|
+
- 🔄 KB context now injected into user message (instead of separate system message)
|
|
34
|
+
- 🔄 System prompt rewritten for better KB utilization
|
|
35
|
+
- 🔄 Profile storage method (preferences stored as JSON in SQL)
|
|
36
|
+
|
|
37
|
+
## [1.0.3] - 2025-10-12
|
|
38
|
+
|
|
39
|
+
### Added
|
|
40
|
+
- 📦 Initial PyPI release
|
|
41
|
+
- 🎯 Core memory features (JSON & SQL)
|
|
42
|
+
- 🤖 Ollama integration
|
|
43
|
+
- 💾 Knowledge base system
|
|
44
|
+
- 🛠️ User tools
|
|
45
|
+
- ⚙️ Configuration management
|
|
46
|
+
|
|
47
|
+
### Features
|
|
48
|
+
- Memory-enabled AI agent
|
|
49
|
+
- JSON and SQL memory backends
|
|
50
|
+
- Knowledge base integration
|
|
51
|
+
- User profile management
|
|
52
|
+
- Conversation history
|
|
53
|
+
- Configuration from YAML/documents
|
|
54
|
+
|
|
55
|
+
## [1.0.2] - 2025-10-11
|
|
56
|
+
|
|
57
|
+
### Internal
|
|
58
|
+
- 🔧 Package structure improvements
|
|
59
|
+
- 📝 Documentation updates
|
|
60
|
+
|
|
61
|
+
## [1.0.1] - 2025-10-10
|
|
62
|
+
|
|
63
|
+
### Fixed
|
|
64
|
+
- 🐛 Import errors after package rename
|
|
65
|
+
- 📦 Package directory naming issues
|
|
66
|
+
|
|
67
|
+
## [1.0.0] - 2025-10-09
|
|
68
|
+
|
|
69
|
+
### Initial Release
|
|
70
|
+
- 🎉 First stable release
|
|
71
|
+
- 🤖 Memory-enabled AI assistant
|
|
72
|
+
- 💾 JSON memory management
|
|
73
|
+
- 🔌 Ollama integration
|
|
@@ -407,47 +407,76 @@ REMEMBER: Knowledge base = truth. Always use it when provided!"""
|
|
|
407
407
|
|
|
408
408
|
def _update_user_profile(self, user_id: str, message: str, response: str):
|
|
409
409
|
"""Extract user info from conversation and update profile"""
|
|
410
|
-
if not hasattr(self.memory, 'update_profile'):
|
|
411
|
-
return
|
|
412
|
-
|
|
413
410
|
msg_lower = message.lower()
|
|
414
|
-
|
|
411
|
+
|
|
412
|
+
# Extract information
|
|
413
|
+
extracted = {}
|
|
415
414
|
|
|
416
415
|
# Extract name
|
|
417
|
-
if "my name is" in msg_lower or "i am" in msg_lower or "i'm" in msg_lower:
|
|
418
|
-
|
|
419
|
-
for phrase in ["my name is ", "i am ", "i'm "]:
|
|
416
|
+
if "my name is" in msg_lower or "i am" in msg_lower or "i'm" in msg_lower or "adım" in msg_lower or "ismim" in msg_lower:
|
|
417
|
+
for phrase in ["my name is ", "i am ", "i'm ", "adım ", "ismim ", "benim adım "]:
|
|
420
418
|
if phrase in msg_lower:
|
|
421
419
|
name_part = message[msg_lower.index(phrase) + len(phrase):].strip()
|
|
422
420
|
name = name_part.split()[0] if name_part else None
|
|
423
421
|
if name and len(name) > 1:
|
|
424
|
-
|
|
422
|
+
extracted['name'] = name.strip('.,!?')
|
|
425
423
|
break
|
|
426
424
|
|
|
427
425
|
# Extract favorite food
|
|
428
|
-
if "favorite food" in msg_lower or "favourite food" in msg_lower:
|
|
429
|
-
if "is" in msg_lower:
|
|
430
|
-
food = msg_lower.split("is")[-1].strip().strip(
|
|
426
|
+
if "favorite food" in msg_lower or "favourite food" in msg_lower or "sevdiğim yemek" in msg_lower or "en sevdiğim" in msg_lower:
|
|
427
|
+
if "is" in msg_lower or ":" in msg_lower:
|
|
428
|
+
food = msg_lower.split("is")[-1].strip() if "is" in msg_lower else msg_lower.split(":")[-1].strip()
|
|
429
|
+
food = food.strip('.,!?')
|
|
431
430
|
if food and len(food) < 50:
|
|
432
|
-
|
|
431
|
+
extracted['favorite_food'] = food
|
|
433
432
|
|
|
434
433
|
# Extract location
|
|
435
|
-
if "i live in" in msg_lower or "i'm from" in msg_lower or "
|
|
436
|
-
for phrase in ["i live in ", "i'm from ", "from "]:
|
|
434
|
+
if "i live in" in msg_lower or "i'm from" in msg_lower or "yaşıyorum" in msg_lower or "yaşadığım" in msg_lower:
|
|
435
|
+
for phrase in ["i live in ", "i'm from ", "from ", "yaşıyorum", "yaşadığım yer", "yaşadığım şehir"]:
|
|
437
436
|
if phrase in msg_lower:
|
|
438
437
|
loc = message[msg_lower.index(phrase) + len(phrase):].strip()
|
|
439
438
|
location = loc.split()[0] if loc else None
|
|
440
439
|
if location and len(location) > 2:
|
|
441
|
-
|
|
440
|
+
extracted['location'] = location.strip('.,!?')
|
|
442
441
|
break
|
|
443
442
|
|
|
444
443
|
# Save updates
|
|
445
|
-
if
|
|
444
|
+
if extracted:
|
|
446
445
|
try:
|
|
447
|
-
|
|
448
|
-
self.
|
|
449
|
-
|
|
450
|
-
|
|
446
|
+
# SQL memory - store in preferences JSON
|
|
447
|
+
if hasattr(self.memory, 'update_user_profile'):
|
|
448
|
+
# Get current profile
|
|
449
|
+
profile = self.memory.get_user_profile(user_id) or {}
|
|
450
|
+
|
|
451
|
+
# Update name directly if extracted
|
|
452
|
+
updates = {}
|
|
453
|
+
if 'name' in extracted:
|
|
454
|
+
updates['name'] = extracted.pop('name')
|
|
455
|
+
|
|
456
|
+
# Store other info in preferences
|
|
457
|
+
if extracted:
|
|
458
|
+
current_prefs = profile.get('preferences')
|
|
459
|
+
if current_prefs:
|
|
460
|
+
try:
|
|
461
|
+
prefs = json.loads(current_prefs) if isinstance(current_prefs, str) else current_prefs
|
|
462
|
+
except:
|
|
463
|
+
prefs = {}
|
|
464
|
+
else:
|
|
465
|
+
prefs = {}
|
|
466
|
+
|
|
467
|
+
prefs.update(extracted)
|
|
468
|
+
updates['preferences'] = json.dumps(prefs)
|
|
469
|
+
|
|
470
|
+
if updates:
|
|
471
|
+
self.memory.update_user_profile(user_id, updates)
|
|
472
|
+
self.logger.debug(f"Profile updated for {user_id}: {extracted}")
|
|
473
|
+
|
|
474
|
+
# JSON memory - direct update
|
|
475
|
+
elif hasattr(self.memory, 'update_profile'):
|
|
476
|
+
self.memory.update_profile(user_id, extracted)
|
|
477
|
+
self.logger.debug(f"Profile updated for {user_id}: {extracted}")
|
|
478
|
+
except Exception as e:
|
|
479
|
+
self.logger.error(f"Error updating profile: {e}")
|
|
451
480
|
|
|
452
481
|
def get_user_profile(self, user_id: Optional[str] = None) -> Dict:
|
|
453
482
|
"""
|
|
@@ -457,16 +486,44 @@ REMEMBER: Knowledge base = truth. Always use it when provided!"""
|
|
|
457
486
|
user_id: User ID (uses current_user if not specified)
|
|
458
487
|
|
|
459
488
|
Returns:
|
|
460
|
-
User profile dictionary
|
|
489
|
+
User profile dictionary with all info (name, favorite_food, location, etc.)
|
|
461
490
|
"""
|
|
462
491
|
uid = user_id or self.current_user
|
|
463
492
|
if not uid:
|
|
464
493
|
return {}
|
|
465
494
|
|
|
466
495
|
try:
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
496
|
+
# Check if SQL or JSON memory
|
|
497
|
+
if hasattr(self.memory, 'get_user_profile'):
|
|
498
|
+
# SQL memory - merge preferences into main dict
|
|
499
|
+
profile = self.memory.get_user_profile(uid)
|
|
500
|
+
if not profile:
|
|
501
|
+
return {}
|
|
502
|
+
|
|
503
|
+
# Parse preferences JSON if exists
|
|
504
|
+
result = {
|
|
505
|
+
'user_id': profile.get('user_id'),
|
|
506
|
+
'name': profile.get('name'),
|
|
507
|
+
'first_seen': profile.get('first_seen'),
|
|
508
|
+
'last_interaction': profile.get('last_interaction'),
|
|
509
|
+
}
|
|
510
|
+
|
|
511
|
+
# Merge preferences
|
|
512
|
+
prefs_str = profile.get('preferences')
|
|
513
|
+
if prefs_str:
|
|
514
|
+
try:
|
|
515
|
+
prefs = json.loads(prefs_str) if isinstance(prefs_str, str) else prefs_str
|
|
516
|
+
result.update(prefs) # Add favorite_food, location, etc.
|
|
517
|
+
except:
|
|
518
|
+
pass
|
|
519
|
+
|
|
520
|
+
return result
|
|
521
|
+
else:
|
|
522
|
+
# JSON memory
|
|
523
|
+
memory_data = self.memory.load_memory(uid)
|
|
524
|
+
return memory_data.get('profile', {})
|
|
525
|
+
except Exception as e:
|
|
526
|
+
self.logger.error(f"Error getting user profile: {e}")
|
|
470
527
|
return {}
|
|
471
528
|
|
|
472
529
|
def add_knowledge(self, category: str, question: str, answer: str,
|
|
@@ -259,4 +259,54 @@ class MemoryManager:
|
|
|
259
259
|
self.load_memory(user_id)
|
|
260
260
|
|
|
261
261
|
return self.user_profiles.get(user_id)
|
|
262
|
+
|
|
263
|
+
def update_user_profile(self, user_id: str, updates: Dict) -> None:
|
|
264
|
+
"""
|
|
265
|
+
Update user profile (SQL-compatible alias)
|
|
266
|
+
|
|
267
|
+
Args:
|
|
268
|
+
user_id: User ID
|
|
269
|
+
updates: Fields to update
|
|
270
|
+
"""
|
|
271
|
+
return self.update_profile(user_id, updates)
|
|
272
|
+
|
|
273
|
+
def add_user(self, user_id: str, name: Optional[str] = None, metadata: Optional[Dict] = None) -> None:
|
|
274
|
+
"""
|
|
275
|
+
Add or update user (SQL-compatible method)
|
|
276
|
+
|
|
277
|
+
Args:
|
|
278
|
+
user_id: User ID
|
|
279
|
+
name: User name (optional)
|
|
280
|
+
metadata: Additional metadata (optional)
|
|
281
|
+
"""
|
|
282
|
+
self.load_memory(user_id)
|
|
283
|
+
if name and 'name' not in self.user_profiles[user_id]:
|
|
284
|
+
self.user_profiles[user_id]['name'] = name
|
|
285
|
+
if metadata:
|
|
286
|
+
self.user_profiles[user_id].update(metadata)
|
|
287
|
+
self.save_memory(user_id)
|
|
288
|
+
|
|
289
|
+
def get_statistics(self) -> Dict:
|
|
290
|
+
"""
|
|
291
|
+
Get general statistics (SQL-compatible method)
|
|
292
|
+
|
|
293
|
+
Returns:
|
|
294
|
+
Statistics dictionary
|
|
295
|
+
"""
|
|
296
|
+
all_users = list(self.memory_dir.glob("*.json"))
|
|
297
|
+
total_interactions = 0
|
|
298
|
+
|
|
299
|
+
for user_file in all_users:
|
|
300
|
+
try:
|
|
301
|
+
with open(user_file, 'r', encoding='utf-8') as f:
|
|
302
|
+
data = json.load(f)
|
|
303
|
+
total_interactions += len(data.get('conversations', []))
|
|
304
|
+
except:
|
|
305
|
+
pass
|
|
306
|
+
|
|
307
|
+
return {
|
|
308
|
+
'total_users': len(all_users),
|
|
309
|
+
'total_interactions': total_interactions,
|
|
310
|
+
'knowledge_base_entries': 0 # JSON doesn't have KB
|
|
311
|
+
}
|
|
262
312
|
|
|
@@ -11,7 +11,7 @@ long_description = (this_directory / "README.md").read_text(encoding='utf-8')
|
|
|
11
11
|
|
|
12
12
|
setup(
|
|
13
13
|
name="mem-llm",
|
|
14
|
-
version="1.0.
|
|
14
|
+
version="1.0.7",
|
|
15
15
|
author="C. Emre Karataş",
|
|
16
16
|
author_email="karatasqemre@gmail.com", # PyPI için gerekli - kendi emailinizi yazın
|
|
17
17
|
description="Memory-enabled AI assistant with local LLM support",
|
mem_llm-1.0.5/CHANGELOG.md
DELETED
|
@@ -1,237 +0,0 @@
|
|
|
1
|
-
# 📋 Değişiklik Günlüğü
|
|
2
|
-
|
|
3
|
-
## [2.0.0] - 2025-10-13
|
|
4
|
-
|
|
5
|
-
### 🎉 Major Update - Production Ready!
|
|
6
|
-
|
|
7
|
-
#### ✨ Yeni Özellikler
|
|
8
|
-
|
|
9
|
-
##### 💾 SQL Veritabanı Desteği (`memory_db.py`)
|
|
10
|
-
- SQLite tabanlı kalıcı bellek sistemi
|
|
11
|
-
- Kullanıcı profilleri tablosu
|
|
12
|
-
- Konuşma geçmişi tablosu
|
|
13
|
-
- Bilgi bankası tablosu
|
|
14
|
-
- Senaryo şablonları tablosu
|
|
15
|
-
- Performans optimizasyonlu indeksler
|
|
16
|
-
- Thread-safe bağlantı yönetimi
|
|
17
|
-
|
|
18
|
-
##### 🎨 Prompt Şablon Sistemi (`prompt_templates.py`)
|
|
19
|
-
- 8 hazır kullanıma hazır şablon:
|
|
20
|
-
1. **customer_service** - Müşteri hizmetleri
|
|
21
|
-
2. **tech_support** - Teknik destek
|
|
22
|
-
3. **sales_assistant** - Satış danışmanı
|
|
23
|
-
4. **education_tutor** - Eğitim asistanı
|
|
24
|
-
5. **health_advisor** - Sağlık bilgilendirme
|
|
25
|
-
6. **personal_assistant** - Kişisel asistan
|
|
26
|
-
7. **booking_assistant** - Rezervasyon sistemi
|
|
27
|
-
8. **hr_assistant** - İK asistanı
|
|
28
|
-
- Değişken destekli şablon sistemi
|
|
29
|
-
- Runtime'da şablon değiştirme
|
|
30
|
-
- Özel şablon ekleme desteği
|
|
31
|
-
|
|
32
|
-
##### 📚 Bilgi Bankası Sistemi (`knowledge_loader.py`)
|
|
33
|
-
- Önceden tanımlı problem/çözüm veritabanı
|
|
34
|
-
- E-ticaret bilgi bankası (kargo, iade, ödeme, sipariş vb.)
|
|
35
|
-
- Teknik destek bilgi bankası
|
|
36
|
-
- JSON/YAML dosyasından yükleme
|
|
37
|
-
- Programatik kayıt ekleme
|
|
38
|
-
- Kategori bazlı arama
|
|
39
|
-
- Öncelik (priority) sistemi
|
|
40
|
-
- Anahtar kelime eşleştirme
|
|
41
|
-
|
|
42
|
-
##### ⚙️ Yapılandırma Sistemi (`config.yaml`, `config_manager.py`)
|
|
43
|
-
- YAML tabanlı konfigürasyon
|
|
44
|
-
- Modüler ayar grupları:
|
|
45
|
-
- LLM ayarları (model, temperature, vb.)
|
|
46
|
-
- Bellek ayarları (backend, cleanup vb.)
|
|
47
|
-
- Prompt ayarları (şablon, değişkenler)
|
|
48
|
-
- Bilgi bankası ayarları
|
|
49
|
-
- Güvenlik ayarları
|
|
50
|
-
- Loglama ayarları
|
|
51
|
-
- Performans ayarları
|
|
52
|
-
- Analytics ayarları
|
|
53
|
-
- Nokta notasyonu ile kolay erişim
|
|
54
|
-
- Environment variable desteği
|
|
55
|
-
- Runtime'da yeniden yükleme
|
|
56
|
-
|
|
57
|
-
##### 🚀 MemAgentPro (`mem_agent_pro.py`)
|
|
58
|
-
- SQL + Config + KB + Prompt entegrasyonu
|
|
59
|
-
- Gelişmiş loglama sistemi
|
|
60
|
-
- Performans metrikleri
|
|
61
|
-
- Otomatik bilgi bankası yükleme
|
|
62
|
-
- Context-aware cevaplar
|
|
63
|
-
- Metadata desteği
|
|
64
|
-
- İstatistik ve raporlama
|
|
65
|
-
- Production-ready yapı
|
|
66
|
-
|
|
67
|
-
#### 📖 Dokümantasyon
|
|
68
|
-
|
|
69
|
-
##### `INTEGRATION_GUIDE.md`
|
|
70
|
-
- Kapsamlı entegrasyon rehberi
|
|
71
|
-
- Flask/FastAPI API örnekleri
|
|
72
|
-
- Docker deployment
|
|
73
|
-
- PostgreSQL entegrasyonu
|
|
74
|
-
- Özel bilgi bankası oluşturma
|
|
75
|
-
- Excel import
|
|
76
|
-
- Nginx reverse proxy
|
|
77
|
-
- Systemd service
|
|
78
|
-
- Güvenlik best practices
|
|
79
|
-
- Monitoring ve logging
|
|
80
|
-
- Troubleshooting
|
|
81
|
-
|
|
82
|
-
##### `README_UPDATED.md`
|
|
83
|
-
- v2.0 özellikleri
|
|
84
|
-
- Hızlı başlangıç
|
|
85
|
-
- Yapılandırma örnekleri
|
|
86
|
-
- Prompt şablonları rehberi
|
|
87
|
-
- Bilgi bankası kullanımı
|
|
88
|
-
- API entegrasyon örnekleri
|
|
89
|
-
- Production deployment
|
|
90
|
-
- Performans metrikleri
|
|
91
|
-
|
|
92
|
-
##### `CHANGELOG.md`
|
|
93
|
-
- Detaylı değişiklik listesi
|
|
94
|
-
- Versiyon karşılaştırması
|
|
95
|
-
- Migrasyon rehberi
|
|
96
|
-
|
|
97
|
-
#### 🔧 İyileştirmeler
|
|
98
|
-
|
|
99
|
-
- **Performans**: SQL indeksleri ile %300 hızlanma
|
|
100
|
-
- **Ölçeklenebilirlik**: 1000+ kullanıcı desteği
|
|
101
|
-
- **Güvenlik**: Rate limiting, input validation
|
|
102
|
-
- **Monitoring**: Prometheus metrikleri hazır
|
|
103
|
-
- **Loglama**: Yapılandırılabilir log seviyesi
|
|
104
|
-
|
|
105
|
-
#### 🔌 Entegrasyon Örnekleri
|
|
106
|
-
|
|
107
|
-
##### `example_pro_usage.py`
|
|
108
|
-
- Temel kurulum örneği
|
|
109
|
-
- Bilgi bankası kullanımı
|
|
110
|
-
- Prompt şablonları demo
|
|
111
|
-
- Bellek ve bağlam örneği
|
|
112
|
-
- İstatistik raporlama
|
|
113
|
-
|
|
114
|
-
#### 📦 Paket Güncellemeleri
|
|
115
|
-
|
|
116
|
-
##### `requirements.txt`
|
|
117
|
-
- pyyaml>=6.0.1 eklendi (config için)
|
|
118
|
-
- Opsiyonel bağımlılıklar dokümante edildi:
|
|
119
|
-
- Flask/FastAPI (web API)
|
|
120
|
-
- PostgreSQL (dış DB)
|
|
121
|
-
- Pandas (Excel import)
|
|
122
|
-
- Prometheus (monitoring)
|
|
123
|
-
|
|
124
|
-
##### `__init__.py`
|
|
125
|
-
- Pro version importları
|
|
126
|
-
- Graceful fallback (Pro olmadan da çalışır)
|
|
127
|
-
- Versiyon 2.0.0
|
|
128
|
-
|
|
129
|
-
#### 🏗️ Mimari Değişiklikler
|
|
130
|
-
|
|
131
|
-
**Eski Yapı (v1.0):**
|
|
132
|
-
```
|
|
133
|
-
MemAgent → MemoryManager (JSON) → LLM
|
|
134
|
-
```
|
|
135
|
-
|
|
136
|
-
**Yeni Yapı (v2.0):**
|
|
137
|
-
```
|
|
138
|
-
MemAgentPro → ConfigManager
|
|
139
|
-
→ SQLMemoryManager
|
|
140
|
-
→ PromptManager
|
|
141
|
-
→ KnowledgeLoader
|
|
142
|
-
→ LLMClient
|
|
143
|
-
```
|
|
144
|
-
|
|
145
|
-
#### 🔄 Geriye Dönük Uyumluluk
|
|
146
|
-
|
|
147
|
-
- `MemAgent` (basit versiyon) hala çalışır
|
|
148
|
-
- JSON bellek sistemi korundu
|
|
149
|
-
- Mevcut kodlar kırılmadan çalışır
|
|
150
|
-
- Pro özellikler opsiyonel
|
|
151
|
-
|
|
152
|
-
---
|
|
153
|
-
|
|
154
|
-
## [1.0.0] - 2025-10-13 (İlk Sürüm)
|
|
155
|
-
|
|
156
|
-
### ✨ İlk Özellikler
|
|
157
|
-
|
|
158
|
-
- Temel `MemAgent` sınıfı
|
|
159
|
-
- JSON tabanlı bellek yönetimi
|
|
160
|
-
- Ollama LLM entegrasyonu
|
|
161
|
-
- Basit sohbet sistemi
|
|
162
|
-
- Kullanıcı profilleri
|
|
163
|
-
- Konuşma geçmişi
|
|
164
|
-
- Bellek arama
|
|
165
|
-
- Basit örnekler
|
|
166
|
-
|
|
167
|
-
---
|
|
168
|
-
|
|
169
|
-
## Migrasyon Rehberi: v1.0 → v2.0
|
|
170
|
-
|
|
171
|
-
### JSON'dan SQL'e Geçiş
|
|
172
|
-
|
|
173
|
-
```python
|
|
174
|
-
# Eski (v1.0)
|
|
175
|
-
from mem_agent import MemAgent
|
|
176
|
-
agent = MemAgent()
|
|
177
|
-
|
|
178
|
-
# Yeni (v2.0) - Basit kullanım aynı
|
|
179
|
-
from mem_agent import MemAgent
|
|
180
|
-
agent = MemAgent() # Hala çalışır!
|
|
181
|
-
|
|
182
|
-
# Yeni (v2.0) - Pro özellikler
|
|
183
|
-
from mem_agent_pro import MemAgentPro
|
|
184
|
-
agent = MemAgentPro() # SQL + Config + KB
|
|
185
|
-
```
|
|
186
|
-
|
|
187
|
-
### Veri Migrasyonu
|
|
188
|
-
|
|
189
|
-
```python
|
|
190
|
-
# JSON verilerini SQL'e taşıma
|
|
191
|
-
import json
|
|
192
|
-
from memory_db import SQLMemoryManager
|
|
193
|
-
|
|
194
|
-
sql_db = SQLMemoryManager("memories.db")
|
|
195
|
-
|
|
196
|
-
# Eski JSON dosyalarını oku
|
|
197
|
-
for json_file in Path("memories").glob("*.json"):
|
|
198
|
-
with open(json_file) as f:
|
|
199
|
-
data = json.load(f)
|
|
200
|
-
|
|
201
|
-
user_id = data['profile']['user_id']
|
|
202
|
-
sql_db.add_user(user_id, data['profile'].get('name'))
|
|
203
|
-
|
|
204
|
-
for conv in data['conversations']:
|
|
205
|
-
sql_db.add_interaction(
|
|
206
|
-
user_id=user_id,
|
|
207
|
-
user_message=conv['user_message'],
|
|
208
|
-
bot_response=conv['bot_response'],
|
|
209
|
-
metadata=conv.get('metadata')
|
|
210
|
-
)
|
|
211
|
-
```
|
|
212
|
-
|
|
213
|
-
---
|
|
214
|
-
|
|
215
|
-
## Planlanan Özellikler (v2.1+)
|
|
216
|
-
|
|
217
|
-
- [ ] Vector database desteği (semantic search)
|
|
218
|
-
- [ ] Çoklu model desteği (GPT-4, Claude vb.)
|
|
219
|
-
- [ ] Sesli konuşma (speech-to-text)
|
|
220
|
-
- [ ] Sentiment analizi
|
|
221
|
-
- [ ] Otomatik öğrenme (feedback loop)
|
|
222
|
-
- [ ] Multi-language support
|
|
223
|
-
- [ ] Web UI dashboard
|
|
224
|
-
- [ ] Real-time analytics
|
|
225
|
-
- [ ] WebSocket desteği
|
|
226
|
-
- [ ] Kubernetes deployment
|
|
227
|
-
|
|
228
|
-
---
|
|
229
|
-
|
|
230
|
-
## Katkıda Bulunanlar
|
|
231
|
-
|
|
232
|
-
- C. Emre Karataş - Initial work & v2.0 major update
|
|
233
|
-
|
|
234
|
-
---
|
|
235
|
-
|
|
236
|
-
**Tam değişiklik listesi**: [v1.0...v2.0](https://github.com/yourusername/mem-agent/compare/v1.0...v2.0)
|
|
237
|
-
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|