MCPcopy Create free account
hub / github.com/contextform/freecad-mcp / learn_preference

Method learn_preference

AICopilot/memory_system.py:255–262  ·  view source on GitHub ↗

Learn a user preference

(self, pref_type: str, pref_value: str, confidence: float = 1.0)

Source from the content-addressed store, hash-verified

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"""

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected