-
Notifications
You must be signed in to change notification settings - Fork 3.2k
fix multipartform issue #44123
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
fix multipartform issue #44123
Conversation
API Change CheckAPIView identified API level changes in this PR and created the following API reviews |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes a multipart form data handling issue in the Azure AI Transcription SDK by renaming the options parameter to definition in the TranscriptionContent model and updating all references throughout the codebase. The changes are based on an updated API specification (commit hash change in tsp-location.yaml).
Key changes:
- Renamed
TranscriptionContent.optionsparameter todefinitionand made it required (previously optional) - Updated multipart form data field mapping from
"options"to"definition"in both sync and async operations - Modified the
transcribe_from_urlhelper method to use ab"\x00\x00"workaround when no audio file is provided
Reviewed Changes
Copilot reviewed 22 out of 22 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| tsp-location.yaml | Updated API spec commit reference from c75a959c to 5f88489f |
| azure/ai/transcription/models/_models.py | Renamed options to definition in TranscriptionContent model; changed from optional to required parameter |
| azure/ai/transcription/_operations/_operations.py | Updated multipart form data field list to use "definition" instead of "options" |
| azure/ai/transcription/_operations/_patch.py | Added pylint suppression and updated transcribe_from_url to use definition parameter with b"\x00\x00" workaround for audio |
| azure/ai/transcription/aio/_operations/_operations.py | Updated multipart form data field list to use "definition" instead of "options" (async version) |
| azure/ai/transcription/aio/_operations/_patch.py | Added pylint suppression and updated transcribe_from_url to use definition parameter with b"\x00\x00" workaround for audio (async version) |
| samples/sample_*.py (7 files) | Updated all sample files to use definition=options instead of options=options when creating TranscriptionContent |
| samples/async_samples/sample_*_async.py (6 files) | Updated all async sample files to use definition=options instead of options=options |
| generated_tests/test_transcription.py | Updated test body structure to use "definition" field and reordered fields (definition before audio) |
| generated_tests/test_transcription_async.py | Updated test body structure to use "definition" field and reordered fields (definition before audio) |
| README.md | Updated documentation examples to use definition parameter and removed extraneous blank line |
sdk/cognitiveservices/azure-ai-transcription/azure/ai/transcription/_operations/_patch.py
Outdated
Show resolved
Hide resolved
sdk/cognitiveservices/azure-ai-transcription/azure/ai/transcription/aio/_operations/_patch.py
Outdated
Show resolved
Hide resolved
sdk/cognitiveservices/azure-ai-transcription/azure/ai/transcription/models/_models.py
Show resolved
Hide resolved
…/amber-yujueWang/azure-sdk-for-python into wangamber/llmspeechsdkpreviewfix
Description
Please add an informative description that covers that changes made by the pull request and link all relevant issues.
If an SDK is being regenerated based on a new API spec, a link to the pull request containing these API spec changes should be included above.
All SDK Contribution checklist:
General Guidelines and Best Practices
Testing Guidelines