Skip to content

fix(pipecat): export InputParams from the package root - #1575

Open
Agnik47 wants to merge 1 commit into
supermemoryai:mainfrom
Agnik47:fix/pipecat-inputparams-export
Open

fix(pipecat): export InputParams from the package root#1575
Agnik47 wants to merge 1 commit into
supermemoryai:mainfrom
Agnik47:fix/pipecat-inputparams-export

Conversation

@Agnik47

@Agnik47 Agnik47 commented Aug 21, 2026

Copy link
Copy Markdown

Problem

The Pipecat quickstart in the docs fails on its second line:

from supermemory_pipecat import SupermemoryPipecatService
from supermemory_pipecat.service import InputParams
# ImportError: cannot import name 'InputParams' from 'supermemory_pipecat.service'

InputParams is a nested class on SupermemoryPipecatService (service.py:54) — which is correct, it matches Pipecat's own Service.InputParams convention. But that means it is not a module-level name in .service, and nothing in the package exposed it either. Anyone copying the config example from docs.supermemory.ai hits an ImportError before reaching a single Supermemory call.

Both occurrences are affected: apps/docs/integrations/pipecat.mdx lines 32 and 161 (the Configuration snippet and the full FastAPI voice-bot example).

Why the alias, not just a docs edit

supermemory_cartesia — the sibling SDK with the identical nested-config shape — already solves exactly this, explicitly:

# packages/cartesia-sdk-python/src/supermemory_cartesia/__init__.py
# Export MemoryConfig as a top-level class for convenience
MemoryConfig = SupermemoryCartesiaAgent.MemoryConfig

Pipecat was the only one of the two missing it, and its docs were written as if it had it. So this restores parity rather than papering over the gap. Happy to reduce this to a docs-only change (params=SupermemoryPipecatService.InputParams(...)) if you'd rather not widen the export surface — just say so.

Changes

  1. supermemory_pipecat/__init__.py — add InputParams = SupermemoryPipecatService.InputParams and the __all__ entry, mirroring cartesia.
  2. apps/docs/integrations/pipecat.mdx — point both imports at the package root: from supermemory_pipecat import InputParams, SupermemoryPipecatService.
  3. tests/test_public_exports.py — regression test.

The nested SupermemoryPipecatService.InputParams form used by the package's own README and Agents.md keeps working unchanged. No behavioural change — it's the same class object, asserted with assertIs.

Testing

Run with the existing suite's dependency stubs (_install_test_stubs), so no pipecat-ai install needed:

$ cd packages/pipecat-sdk-python && PYTHONPATH=src python3 -m unittest discover -s . -p "test_*.py" -v
test_retrieve_memories_handles_null_profile ... ok
test_documented_configuration_example_constructs ... ok
test_input_params_is_exported_from_the_package_root ... ok
Ran 3 tests in 0.022s
OK

Reverting only the __init__.py alias reproduces the original failure, confirming the test guards the right thing:

ImportError: cannot import name 'InputParams' from 'supermemory_pipecat'
Ran 2 tests in 0.020s
FAILED (errors=1)

I also swept every from supermemory_* import ... line across apps/docs/** against each package's actual exports — this was the only broken one. (supermemory_bash in the SMFS pages resolves to a separately published package, not this repo.) The same sweep over documented constructor kwargs found no mismatches.

The documented Pipecat quickstart fails on its second line:

    from supermemory_pipecat.service import InputParams
    ImportError: cannot import name 'InputParams' from 'supermemory_pipecat.service'

`InputParams` is a nested class on `SupermemoryPipecatService` (service.py:54),
matching Pipecat's own `Service.InputParams` convention, so it is not a
module-level name in `.service` and never has been. Nothing in the package
exposed it, so every reader who copied the config example from
docs.supermemory.ai hit an ImportError before reaching any Supermemory call.

`supermemory_cartesia` -- the sibling SDK with the identical nested-config
shape -- already solves this with an explicit alias:

    # Export MemoryConfig as a top-level class for convenience
    MemoryConfig = SupermemoryCartesiaAgent.MemoryConfig

Pipecat was the only one of the two missing it. Adds the matching alias plus
`__all__` entry, and points the two documented imports at the package root
where it now lives. The nested `SupermemoryPipecatService.InputParams` form
used by the package README keeps working unchanged.

Adds tests/test_public_exports.py, which fails with the original ImportError
if the alias is removed.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NhupP1YqDMS3K1xouqwUnf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant