2828 }}<span class =" color-danger" >*</span ></span
2929 >
3030 </div >
31+ <el-button
32+ type =" primary"
33+ link
34+ @click =" openSTTParamSettingDialog"
35+ :disabled =" !form_data.stt_model_id"
36+ class =" mr-4"
37+ >
38+ <AppIcon iconName =" app-setting" ></AppIcon >
39+ </el-button >
3140 </div >
3241 </template >
3342 <ModelSelect
91100 </el-form-item >
92101 </el-form >
93102 </el-card >
103+ <STTModeParamSettingDialog ref =" STTModeParamSettingDialogRef" @refresh =" refreshSTTForm" />
94104 </NodeContainer >
95105</template >
96106
@@ -100,12 +110,17 @@ import { computed, onMounted, ref, inject } from 'vue'
100110import { groupBy , set } from ' lodash'
101111import NodeCascader from ' @/workflow/common/NodeCascader.vue'
102112import type { FormInstance } from ' element-plus'
113+ import { MsgSuccess } from ' @/utils/message'
114+ import { t } from ' @/locales'
103115import { useRoute } from ' vue-router'
104116import { loadSharedApi } from ' @/utils/dynamics-api/shared-api'
117+ import STTModeParamSettingDialog from ' @/views/application/component/STTModelParamSettingDialog.vue'
105118const getApplicationDetail = inject (' getApplicationDetail' ) as any
106119const route = useRoute ()
107120
108- const {} = route as any
121+ const {
122+ params : { id },
123+ } = route as any
109124
110125const apiType = computed (() => {
111126 if (route .path .includes (' resource-management' )) {
@@ -117,6 +132,8 @@ const apiType = computed(() => {
117132
118133const props = defineProps <{ nodeModel: any }>()
119134const modelOptions = ref <any >(null )
135+ const STTModeParamSettingDialogRef = ref <InstanceType <typeof STTModeParamSettingDialog >>()
136+
120137
121138const aiChatNodeFormRef = ref <FormInstance >()
122139const nodeCascaderRef = ref ()
@@ -143,6 +160,7 @@ const form = {
143160 stt_model_id: ' ' ,
144161 is_result: true ,
145162 audio_list: [],
163+ model_params_setting: {},
146164}
147165
148166const form_data = computed ({
@@ -159,6 +177,25 @@ const form_data = computed({
159177 },
160178})
161179
180+
181+ const openSTTParamSettingDialog = () => {
182+ const model_id = form_data .value .stt_model_id
183+ if (! model_id ) {
184+ MsgSuccess (t (' views.application.form.voiceInput.requiredMessage' ))
185+ return
186+ }
187+ STTModeParamSettingDialogRef .value ?.open (
188+ model_id ,
189+ id ,
190+ form_data .value .model_params_setting ,
191+ )
192+ }
193+
194+ const refreshSTTForm = (data : any ) => {
195+ form_data .value .model_params_setting = data
196+ }
197+
198+
162199const application = getApplicationDetail ()
163200function getSelectModel() {
164201 const obj =
0 commit comments