Repository navigation
Conversation
…request and response
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds typed support for the Speech Understanding
action_itemsfeature (ActionItemsRequest,ActionItem,ActionItemsResponse) inaai.typesandTranscriptionConfig.Previously, while Speech Understanding features like
translation,speaker_identification,custom_formatting, andsummarizationwere typed underspeech_understanding.requestandspeech_understanding.response,action_itemswas missing fromSpeechUnderstandingFeatureRequestsandSpeechUnderstandingFeatureResponses.As a result:
action_items(viaTranscriptionConfigdict or model) resulted in Pydantic silently droppingaction_itemsupon serialization, causing requests with onlyaction_itemsto fail with400 Bad Request: speech_understanding.request is empty.speech_understanding.response.action_itemswere dropped during response parsing.Changes
assemblyai/types.py:ActionItemsRequestmodel withinclude_decisions(bool) andeffort("low" | "medium").ActionItemmodel (action_item,quote,timestamp).ActionItemsResponsemodel (status,effort,items).action_items: Optional[ActionItemsRequest]toSpeechUnderstandingFeatureRequests.action_items: Optional[ActionItemsResponse]toSpeechUnderstandingFeatureResponses.TranscriptionConfigdocstring to mentionaction_items.assemblyai/__init__.py:ActionItemsRequest,ActionItem, andActionItemsResponsein__all__and module imports.assemblyai/__version__.py:1.9.0->1.9.1for the repository'sVersion Bump CheckCI workflow.tests/unit/test_action_items.py:TranscriptionConfigserialization, 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.