-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
fix: Fix autosend and autoplay not working #2063
Conversation
--bug=1051779 --user=刘瑞斌 【应用】应用演示页面,不能自动播放回答内容 https://www.tapd.cn/57709429/s/1649281
Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our release note process to remove it. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@@ -981,6 +981,8 @@ def profile(self, with_valid=True): | |||
'stt_model_enable': application.stt_model_enable, | |||
'tts_model_enable': application.tts_model_enable, | |||
'tts_type': application.tts_type, | |||
'tts_autoplay': application.tts_autoplay, | |||
'stt_autosend': application.stt_autosend, | |||
'file_upload_enable': application.file_upload_enable, | |||
'file_upload_setting': application.file_upload_setting, | |||
'work_flow': application.work_flow, |
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.
The provided code snippet appears to be part of a method defined within an profile
function in a Python class. It is adding additional key-value pairs for two new settings (tts_autoplay
and stt_autosend
) to a dictionary being populated for use as application configuration data. This could potentially enhance the functionality or user experience by allowing users to decide whether their text-to-speech (TTS) outputs should automatically start playing after creation, and vice versa for speech-to-text (STT) results.
However, some minor points can be improved:
-
Indentation: The lines associated with the new key-value pairs should also have consistent indentation (4 spaces at a time, similar to existing lines).
-
Consistent Key Naming Conventions: Ensure that all keys maintain consistent naming conventions, such as using underscore separation if applicable (e.g.,
tts_autoplay_enabled
, etc.).
Here is the refactored version:
@@ -981,6 +981,8 @@ def profile(self, with_valid=True):
'stt_model_enable': application.stt_model_enable,
'tts_model_enable': application.tts_model_enable,
'tts_type': application.tts_type,
+ 'tts_autoplay_enabled': application.tts_autoplay_enabled,
+ 'stt_autosend_enabled': application.stt_autosend_enabled,
'file_upload_enable': application.file_upload_enable,
'file_upload_setting': application.file_upload_setting,
'work_flow': application.work_flow,
These slight adjustments make the code clearer and more professional-looking while maintaining its intended functionality.
fix: Fix autosend and autoplay not working --bug=1051779 --user=刘瑞斌 【应用】应用演示页面,不能自动播放回答内容 https://www.tapd.cn/57709429/s/1649281