(self, fact: str, source: str = "conversation")
| 335 | self._entries: list[SessionMemoryEntry] = [] |
| 336 | |
| 337 | def add(self, fact: str, source: str = "conversation") -> None: |
| 338 | import time |
| 339 | for entry in self._entries: |
| 340 | if entry.fact.lower().strip() == fact.lower().strip(): |
| 341 | return |
| 342 | self._entries.append(SessionMemoryEntry( |
| 343 | fact=fact, |
| 344 | source=source, |
| 345 | timestamp=time.time(), |
| 346 | )) |
| 347 | |
| 348 | def add_from_llm_response(self, response_text: str) -> int: |
| 349 | added = 0 |