diff --git a/apps/application/serializers/application_serializers.py b/apps/application/serializers/application_serializers.py index 4dd65d12267..7eab38f90c2 100644 --- a/apps/application/serializers/application_serializers.py +++ b/apps/application/serializers/application_serializers.py @@ -694,6 +694,7 @@ def profile(self, with_valid=True): 'tts_model_id': application.tts_model_id, 'stt_model_enable': application.stt_model_enable, 'tts_model_enable': application.tts_model_enable, + 'work_flow': application.work_flow, 'show_source': application_access_token.show_source}) @transaction.atomic @@ -855,10 +856,15 @@ def get_work_flow_model(instance): nodes = instance.get('work_flow')['nodes'] for node in nodes: if node['id'] == 'base-node': - instance['stt_model_id'] = node['properties']['node_data']['stt_model_id'] - instance['tts_model_id'] = node['properties']['node_data']['tts_model_id'] - instance['stt_model_enable'] = node['properties']['node_data']['stt_model_enable'] - instance['tts_model_enable'] = node['properties']['node_data']['tts_model_enable'] + node_data = node['properties']['node_data'] + if 'stt_model_id' in node_data: + instance['stt_model_id'] = node_data['stt_model_id'] + if 'tts_model_id' in node_data: + instance['tts_model_id'] = node_data['tts_model_id'] + if 'stt_model_enable' in node_data: + instance['stt_model_enable'] = node_data['stt_model_enable'] + if 'tts_model_enable' in node_data: + instance['tts_model_enable'] = node_data['tts_model_enable'] break def speech_to_text(self, file, with_valid=True): diff --git a/ui/src/components/ai-chat/index.vue b/ui/src/components/ai-chat/index.vue index 1d5a9426924..7a75f994f3c 100644 --- a/ui/src/components/ai-chat/index.vue +++ b/ui/src/components/ai-chat/index.vue @@ -17,7 +17,9 @@ class="problem-button ellipsis-2 mb-8" :class="log ? 'disabled' : 'cursor'" > - + + + {{ item.str }} +
+
+ + +
+
+ + + +
+
+