@@ -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+
0 commit comments