Skip to content
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

Enhances method for retrieving task statuses in the CambAI class #2

Merged
merged 4 commits into from
Jun 15, 2024

Conversation

cr2007
Copy link
Owner

@cr2007 cr2007 commented Jun 11, 2024

Refactors and enhances the method for retrieving task statuses in the CambAI class. The changes consolidate the methods for getting the status of various tasks (dubbing, TTS, transcription) into a single method, get_task_status, which improves code maintainability and readability.

  • Replaced get_dubbing_task_status and get_tts_task_status with a single get_task_status method.
  • The get_task_status method now handles three types of tasks: dubbing, tts, and transcription.
  • Added a check to raise a ValueError if an invalid task type is provided.
  • Improved error messages for better debugging.

- Consolidated `get_dubbing_task_status` and `get_tts_task_status` into
  `get_task_status`.
- Added support for "tts", "dubbing", and "transcription" tasks in
  get_task_status.
- Updated method calls to use `get_task_status` with appropriate task
  type.
- Added a check to raise ValueError for invalid task types.
- Ensured URL is initialized before assignment based on task type.
- Removed redundant comments and improved readability.
- Updated docstring for `get_task_status` to include all task types.
- Added a check to raise ValueError for invalid task types.
- Improved URL initialization and assignment logic.
- Enhanced readability by consolidating error checks.
- Replaced `get_dubbing_task_status` with ` for TTS task.
@cr2007 cr2007 merged commit 54d4317 into master Jun 15, 2024
3 checks passed
@cr2007 cr2007 deleted the common-get-task-status branch June 15, 2024 17:49
This pull request was closed.
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