Learn a user preference
(self, pref_type: str, pref_value: str, confidence: float = 1.0)
| 253 | return patterns |
| 254 | |
| 255 | def learn_preference(self, pref_type: str, pref_value: str, confidence: float = 1.0): |
| 256 | """Learn a user preference""" |
| 257 | cursor = self.conn.cursor() |
| 258 | cursor.execute(""" |
| 259 | INSERT OR REPLACE INTO preferences (preference_type, preference_value, confidence, learned_at) |
| 260 | VALUES (?, ?, ?, ?) |
| 261 | """, (pref_type, pref_value, confidence, datetime.now())) |
| 262 | self.conn.commit() |
| 263 | |
| 264 | def get_preferences(self) -> Dict[str, str]: |
| 265 | """Get learned preferences""" |
nothing calls this directly
no outgoing calls
no test coverage detected