Skip to content

Commit d6d7a12

Browse files
committed
cleanup
1 parent 2a25964 commit d6d7a12

6 files changed

Lines changed: 2 additions & 51 deletions

File tree

memu/memory/actions/add_activity_memory.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
"""
77

88
import json
9-
import hashlib
109
import re
1110
from typing import Dict, Any
1211
from datetime import datetime

memu/memory/actions/cluster_memories.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
import os
33
import re
44
from typing import Dict, Any, List
5-
from datetime import datetime
65
import itertools
76

87
from .base_action import BaseAction

memu/memory/actions/generate_suggestions.py

Lines changed: 1 addition & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -202,48 +202,4 @@ def _parse_suggestions_from_text(self, response_text: str, available_categories:
202202
except Exception as e:
203203
raise
204204
return suggestions
205-
206-
# # Look for category headers: **Category: [category_name]**
207-
# if line.startswith('**Category:') and line.endswith('**'):
208-
# category_name = line.replace('**Category:', '').replace('**', '').strip()
209-
# if category_name in available_categories:
210-
# current_category = category_name
211-
# suggestions[current_category] = {
212-
# "should_add": True, # Default to True since category is mentioned
213-
# "suggestion": "",
214-
# "relevant_memory_ids": [item["memory_id"] for item in new_memory_items],
215-
# "priority": "medium"
216-
# }
217-
218-
# # Parse suggestion content: - Suggestion: [content]
219-
# elif current_category and line.startswith('- Suggestion:'):
220-
# suggestion_text = line.replace('- Suggestion:', '').strip()
221-
# if suggestion_text:
222-
# suggestions[current_category]["suggestion"] = suggestion_text
223-
# suggestions[current_category]["should_add"] = True
224-
225-
# # Clean up categories with empty suggestions
226-
# suggestions = {k: v for k, v in suggestions.items() if v["suggestion"].strip()}
227-
228-
# # Fallback: if no valid suggestions parsed, create basic ones
229-
# if not suggestions:
230-
# for category in available_categories:
231-
# suggestions[category] = {
232-
# "should_add": True,
233-
# "suggestion": f"Extract relevant {category} information ensuring each memory item starts with the character name and includes full context",
234-
# "relevant_memory_ids": [item["memory_id"] for item in new_memory_items],
235-
# "priority": "medium"
236-
# }
237-
238-
# except Exception as e:
239-
# # Fallback: create basic suggestions for all categories
240-
# suggestions = {}
241-
# for category in available_categories:
242-
# suggestions[category] = {
243-
# "should_add": True,
244-
# "suggestion": f"Extract relevant {category} information ensuring each memory item is a complete sentence with full subject and specific details",
245-
# "relevant_memory_ids": [item["memory_id"] for item in new_memory_items],
246-
# "priority": "medium"
247-
# }
248-
249-
# return suggestions
205+

memu/memory/actions/link_related_memories.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
import json
88
import math
99
from typing import Dict, Any, List, Optional
10-
from datetime import datetime
1110
from .base_action import BaseAction
1211
from ...utils import get_logger
1312

memu/memory/actions/run_theory_of_mind.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
from typing import Dict, Any, List
44
from datetime import datetime
5-
from pathlib import Path
65

76
from .base_action import BaseAction
87

@@ -241,7 +240,7 @@ def _parse_theory_of_mind_from_text(self, character_name: str, response_text: st
241240
f.write('\n'.join([
242241
f"[{item['memory_id']}][mentioned at {item.get('session_date', 'Unknown')}] {item['content']} []"
243242
for item in theory_of_mind_items
244-
]))
243+
]) + '\n')
245244

246245
except Exception as e:
247246
import traceback

memu/memory/actions/update_memory_with_suggestions.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
"""
1010

1111
import json
12-
import hashlib
1312
from datetime import datetime
1413
from typing import Dict, List, Any
1514
from .base_action import BaseAction

0 commit comments

Comments
 (0)