mirror of
https://github.com/supermemoryai/supermemory.git
synced 2026-09-15 23:31:05 +00:00
The pipecat, cartesia, and agent-framework packages all pass search results from the Supermemory SDK (pydantic models, attribute access, snake_case fields) into dedup/format helpers written for plain dicts. The consequences differed by package but all killed the feature's primary path: - pipecat: deduplicate_memories called r.get() on a Result model -> AttributeError -> the outer handler logs "Error processing frame" and forwards the frame unchanged, so memories are never injected for any user whose profile lookup returns search results - cartesia: identical crash, swallowed by _enrich_event_with_memories' generic except -> memory_context silently comes back empty and the previous memory block is stripped from the system prompt - agent-framework: extract_memory_text only handled dict/str, so model objects fell through to `return None` and every search-result memory was silently dropped from the injected context (The OpenAI package shares the same helper shape but works because it fetches profile data over raw aiohttp and receives dicts — that asymmetry is what hid this.) pipecat/cartesia gain an extract_search_result_fields helper that reads memory/updatedAt off dicts (camelCase keys) or SDK models (snake_case attributes, datetime-tolerant), used by both deduplicate_memories and format_memories_to_text; the formatter also no longer prints raw object reprs for non-dict items. agent-framework's extract_memory_text gains a model-object branch. Verified against the real SDK: built a supermemory.types.search_memories_response.Result from an API-shaped payload and ran it through dedup -> extract -> format (crashed with AttributeError before, renders "- [1 Jan] User prefers async" after). Test suites: pipecat 7 passed, cartesia 7 passed, agent-framework 56 passed (agent-framework-core pinned to 1.0.0rc3 — newer releases have dropped BaseContextProvider, which breaks the package import independently of this change). |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| test_empty_profile.py | ||
| test_search_result_objects.py | ||