diff --git a/apps/application/flow/step_node/speech_to_text_step_node/i_speech_to_text_node.py b/apps/application/flow/step_node/speech_to_text_step_node/i_speech_to_text_node.py index 7e2a79b56..4753768b9 100644 --- a/apps/application/flow/step_node/speech_to_text_step_node/i_speech_to_text_node.py +++ b/apps/application/flow/step_node/speech_to_text_step_node/i_speech_to_text_node.py @@ -13,7 +13,7 @@ class SpeechToTextNodeSerializer(serializers.Serializer): is_result = serializers.BooleanField(required=False, error_messages=ErrMessage.boolean('是否返回内容')) - audio_list = serializers.ListField(required=False, error_messages=ErrMessage.list("音频")) + audio_list = serializers.ListField(required=True, error_messages=ErrMessage.list("音频文件不能为空", )) class ISpeechToTextNode(INode): diff --git a/apps/application/flow/step_node/text_to_speech_step_node/i_text_to_speech_node.py b/apps/application/flow/step_node/text_to_speech_step_node/i_text_to_speech_node.py index 8b16301a5..1b31f992f 100644 --- a/apps/application/flow/step_node/text_to_speech_step_node/i_text_to_speech_node.py +++ b/apps/application/flow/step_node/text_to_speech_step_node/i_text_to_speech_node.py @@ -13,7 +13,7 @@ class TextToSpeechNodeSerializer(serializers.Serializer): is_result = serializers.BooleanField(required=False, error_messages=ErrMessage.boolean('是否返回内容')) - content_list = serializers.ListField(required=False, error_messages=ErrMessage.list("文本内容")) + content_list = serializers.ListField(required=True, error_messages=ErrMessage.list("文本内容")) model_params_setting = serializers.DictField(required=False, error_messages=ErrMessage.integer("模型参数相关设置")) diff --git a/ui/src/views/application-workflow/index.vue b/ui/src/views/application-workflow/index.vue index fe58d0f38..b0dc53937 100644 --- a/ui/src/views/application-workflow/index.vue +++ b/ui/src/views/application-workflow/index.vue @@ -242,18 +242,14 @@ function clickoutside() { showPopover.value = false } async function publicHandle() { - // 先执行保存 - const obj = { - work_flow: getGraphData() - } - await application.asyncPutApplication(id, obj) // 后执行发布 workflowRef.value ?.validate() - .then(() => { + .then(async () => { const obj = { work_flow: getGraphData() } + await application.asyncPutApplication(id, obj) const workflow = new WorkFlowInstance(obj.work_flow) try { workflow.is_valid() diff --git a/ui/src/workflow/nodes/speech-to-text-node/index.vue b/ui/src/workflow/nodes/speech-to-text-node/index.vue index 8bd2d51a1..5b30970e5 100644 --- a/ui/src/workflow/nodes/speech-to-text-node/index.vue +++ b/ui/src/workflow/nodes/speech-to-text-node/index.vue @@ -92,7 +92,7 @@ prop="audio_list" :rules="{ message: '选择语音文件', - trigger: 'blur', + trigger: 'change', required: true }" > @@ -175,7 +175,7 @@ const wheel = (e: any) => { const form = { stt_model_id: '', is_result: true, - audio_list: ['start-node', 'audio'] + audio_list: [] } const form_data = computed({ @@ -210,9 +210,7 @@ function getProvider() { }) } -const model_change = (model_id?: string) => { - console.log(modelOptions.value) -} +const model_change = (model_id?: string) => {} onMounted(() => { getModel() diff --git a/ui/src/workflow/nodes/text-to-speech-node/index.vue b/ui/src/workflow/nodes/text-to-speech-node/index.vue index 15bbb1682..3d669252a 100644 --- a/ui/src/workflow/nodes/text-to-speech-node/index.vue +++ b/ui/src/workflow/nodes/text-to-speech-node/index.vue @@ -189,7 +189,7 @@ const wheel = (e: any) => { const form = { tts_model_id: '', is_result: true, - content_list: ['start-node', 'content'], + content_list: [], model_params_setting: {} }