Commit graph

5 commits

Author SHA1 Message Date
devteamaegis
3e5d3c3991 fix(pipecat): retain strong refs to background storage tasks to prevent GC
asyncio.create_task() is only weakly referenced by the event loop.  If the
caller discards the returned Task object the GC can destroy it before the
coroutine finishes, silently dropping any messages that were queued for
storage.

The Cartesia SDK in this same repo already uses the correct pattern
(_background_tasks set + add_done_callback(discard)).  Apply the same fix
to SupermemoryPipecatService:

* Add `_background_tasks: set` in __init__
* Save every storage task in the set; remove it via done-callback once
  complete
* Clear the set in reset_memory_tracking()

Adds tests/test_background_task_tracking.py with five test cases:
- presence of _background_tasks attribute
- task is held in the set while running
- task is removed from the set after completion
- a forced GC cycle cannot collect a tracked task mid-execution
- reset_memory_tracking clears the set
2026-05-26 01:50:19 -04:00
Dhravya Shah
1c6b7800a8 chore: bump package versions 2026-01-22 20:50:51 -07:00
Prasanna721
0a8c5fa049 Re - feat(pipecat-sdk): add speech-to-speech model support (Gemini Live) (#683)
#### RE-RAISING Pipecat live speech PR

### Added native speech-to-speech model support

### Summary:
  - Speech-to-speech support - Auto-detect audio frames and inject memories to system prompt for native audio models (Gemini Live, etc.)
  - Fix memory bloating - Replace memories each turn using XML tags instead of accumulating
  - Add temporal context - Show recency on search results ([2d ago], [15 Jan])
  - New inject_mode param - auto (default), system, or user

### Docs update
  - Update the docs for native speech-2-speech models
2026-01-21 03:58:26 +00:00
Dhravya Shah
87b361c26b
docs changes (#678)
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-18 16:55:32 -08:00
Prasanna
d015036b05
pipecat-sdk (#663) 2026-01-10 15:19:31 -08:00