Skip to content

feat(streaming): complete StreamingPiiPolicy parity with EntityType and server entities - #262

Open
pylrn wants to merge 2 commits into
AssemblyAI:masterfrom
pylrn:feat/streaming-pii-granular-location-policies
Open

pylrn wants to merge 2 commits into
AssemblyAI:masterfrom
pylrn:feat/streaming-pii-granular-location-policies

Conversation

@pylrn

@pylrn pylrn commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Completes StreamingPiiPolicy enum parity with EntityType and PIIRedactionPolicy in assemblyai/types.py as well as server-side AAIEntities (which matches StreamingPiiPolicy in the Node SDK).

In addition to granular location policies (location_address, location_address_street, location_city, location_coordinate, location_country, location_state, location_zip), this adds the remaining 11 missing entity types:

  • corporate_action
  • day
  • effect
  • financial_metric
  • medical_code
  • month
  • organization_id
  • product
  • project
  • trend
  • year

Bringing all 65 entity types supported across AssemblyAI into full typed parity in streaming real-time sessions.

Changes

  • assemblyai/streaming/v3/models.py: Expose granular location and general audio intelligence entity policies on StreamingPiiPolicy.
  • assemblyai/__version__.py: Bump to 1.6.2.
  • tests/unit/test_streaming.py & tests/unit/test_streaming_async.py: Add unit tests verifying serialization and parameter acceptance for newly added entity policies, plus an assert test ensuring StreamingPiiPolicy enum values match EntityType 1:1.

Verification

  • All sync and async streaming unit tests pass (141 passed).
  • Parity test verifies set(e.value for e in EntityType) == set(p.value for p in StreamingPiiPolicy).
  • ruff check assemblyai --config ./ruff.toml and ruff format --check --config ./ruff.toml assemblyai pass cleanly.

@pylrn pylrn changed the title feat(streaming): add granular location PII policies to StreamingPiiPolicy feat(streaming): complete StreamingPiiPolicy parity with EntityType and server entities Sep 25, 2026
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