@@ -147,9 +147,9 @@ def to_application_model(user_id: str, application: Dict):
147147 default_workflow = json .loads (default_workflow_json )
148148 for node in default_workflow .get ('nodes' ):
149149 if node .get ('id' ) == 'base-node' :
150- node .get ('properties' )['node_data' ] = { "desc" : application .get ('desc' ),
151- " name" : application .get ('name' ),
152- " prologue" : application .get ('prologue' )}
150+ node .get ('properties' )['node_data' ][ 'desc' ] = application .get ('desc' )
151+ node . get ( 'properties' )[ 'node_data' ][ ' name' ] = application .get ('name' )
152+ node . get ( 'properties' )[ 'node_data' ][ ' prologue' ] = application .get ('prologue' )
153153 return Application (id = uuid .uuid1 (),
154154 name = application .get ('name' ),
155155 desc = application .get ('desc' ),
@@ -160,6 +160,14 @@ def to_application_model(user_id: str, application: Dict):
160160 model_setting = {},
161161 problem_optimization = False ,
162162 type = ApplicationTypeChoices .WORK_FLOW ,
163+ stt_model_enable = application .get ('stt_model_enable' , False ),
164+ stt_model_id = application .get ('stt_model' , None ),
165+ tts_model_id = application .get ('tts_model' , None ),
166+ tts_model_enable = application .get ('tts_model_enable' , False ),
167+ tts_model_params_setting = application .get ('tts_model_params_setting' , {}),
168+ tts_type = application .get ('tts_type' , None ),
169+ file_upload_enable = application .get ('file_upload_enable' , False ),
170+ file_upload_setting = application .get ('file_upload_setting' , {}),
163171 work_flow = default_workflow
164172 )
165173
@@ -502,6 +510,14 @@ def to_application_model(user_id: str, application: Dict):
502510 type = ApplicationTypeChoices .SIMPLE ,
503511 model_params_setting = application .get ('model_params_setting' , {}),
504512 problem_optimization_prompt = application .get ('problem_optimization_prompt' , None ),
513+ stt_model_enable = application .get ('stt_model_enable' , False ),
514+ stt_model_id = application .get ('stt_model' , None ),
515+ tts_model_id = application .get ('tts_model' , None ),
516+ tts_model_enable = application .get ('tts_model_enable' , False ),
517+ tts_model_params_setting = application .get ('tts_model_params_setting' , {}),
518+ tts_type = application .get ('tts_type' , None ),
519+ file_upload_enable = application .get ('file_upload_enable' , False ),
520+ file_upload_setting = application .get ('file_upload_setting' , {}),
505521 work_flow = {}
506522 )
507523
0 commit comments