Skip to content

feat(types): add typed support for Speech Understanding action_items request and response - #291

Open
pylrn wants to merge 1 commit into
AssemblyAI:masterfrom
pylrn:feat/speech-understanding-action-items
Open

pylrn wants to merge 1 commit into
AssemblyAI:masterfrom
pylrn:feat/speech-understanding-action-items

Conversation

@pylrn

@pylrn pylrn commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds typed support for the Speech Understanding action_items feature (ActionItemsRequest, ActionItem, ActionItemsResponse) in aai.types and TranscriptionConfig.

Previously, while Speech Understanding features like translation, speaker_identification, custom_formatting, and summarization were typed under speech_understanding.request and speech_understanding.response, action_items was missing from SpeechUnderstandingFeatureRequests and SpeechUnderstandingFeatureResponses.

As a result:

  • Configuring action_items (via TranscriptionConfig dict or model) resulted in Pydantic silently dropping action_items upon serialization, causing requests with only action_items to fail with 400 Bad Request: speech_understanding.request is empty.
  • Transcript responses containing speech_understanding.response.action_items were dropped during response parsing.

Changes

  • assemblyai/types.py:
    • Added ActionItemsRequest model with include_decisions (bool) and effort ("low" | "medium").
    • Added ActionItem model (action_item, quote, timestamp).
    • Added ActionItemsResponse model (status, effort, items).
    • Added action_items: Optional[ActionItemsRequest] to SpeechUnderstandingFeatureRequests.
    • Added action_items: Optional[ActionItemsResponse] to SpeechUnderstandingFeatureResponses.
    • Updated TranscriptionConfig docstring to mention action_items.
  • assemblyai/__init__.py:
    • Exported ActionItemsRequest, ActionItem, and ActionItemsResponse in __all__ and module imports.
  • assemblyai/__version__.py:
    • Bumped version 1.9.0 -> 1.9.1 for the repository's Version Bump Check CI workflow.
  • tests/unit/test_action_items.py:
    • Unit tests covering model instantiation, default parameters, nested model and dict-style TranscriptionConfig serialization, and transcript response deserialization.

Validation

  • pytest tests/unit/test_action_items.py: 6 passed.
  • ruff check assemblyai tests/unit/test_action_items.py --config ./ruff.toml: clean (0 errors).
  • ruff format --check assemblyai tests/unit/test_action_items.py --config ./ruff.toml: clean (65 files already formatted).
  • pytest tests/unit/test_action_items.py tests/unit/test_speaker_identification.py tests/unit/test_summarization.py tests/unit/test_raw_transcription_config_validate_assignment.py: 44 passed.

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