Skip to content

Keep new Segment fields in compact transcript API responses automatically #16

Open

Description

@scottconverse

Problem

Segment.to_dict(include_words=False) manually enumerates fields. If a future field is added to the Segment dataclass, the default compact HTTP/MCP transcript response will silently omit it, even though saved JSON and Python objects include it.

Proposed work

Start from asdict(self) and remove only the words key when include_words=False. Preserve the existing opt-in word-timing behavior and response shape.

Acceptance criteria

  • Regression test demonstrates that the compact response excludes words but keeps all other current Segment fields.
  • A test guards against future dataclass-field drift.
  • Saved JSON and Python API still retain word timings.

Follow-up from the v0.1.5 review; not a release blocker.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issue

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions