@@ -38,6 +38,15 @@ def get_request_body_api():
3838 }
3939 )
4040
41+ @staticmethod
42+ def get_response_body_api ():
43+ return openapi .Schema (
44+ type = openapi .TYPE_STRING ,
45+ title = _ ("Application authentication token" ),
46+ description = _ ("Application authentication token" ),
47+ default = "token"
48+ )
49+
4150 @staticmethod
4251 def get_response_body_api ():
4352 return openapi .Schema (
@@ -133,6 +142,27 @@ def get_request_body_api():
133142 }
134143 )
135144
145+ @staticmethod
146+ def get_response_body_api ():
147+ return openapi .Schema (
148+ type = openapi .TYPE_OBJECT ,
149+ properties = {
150+ 'id' : openapi .Schema (type = openapi .TYPE_STRING , title = _ ("Primary key id" ),
151+ description = _ ("Primary key id" )),
152+ 'secret_key' : openapi .Schema (type = openapi .TYPE_STRING , title = _ ("Secret key" ),
153+ description = _ ("Secret key" )),
154+ 'is_active' : openapi .Schema (type = openapi .TYPE_BOOLEAN , title = _ ("Is activation" ),
155+ description = _ ("Is activation" )),
156+ 'application_id' : openapi .Schema (type = openapi .TYPE_STRING , title = _ ("Application ID" ),
157+ description = _ ("Application ID" )),
158+ 'allow_cross_domain' : openapi .Schema (type = openapi .TYPE_BOOLEAN ,
159+ title = _ ("Is cross-domain allowed" ),
160+ description = _ ("Is cross-domain allowed" )),
161+ 'cross_domain_list' : openapi .Schema (type = openapi .TYPE_ARRAY , title = _ ('Cross-domain list' ),
162+ items = openapi .Schema (type = openapi .TYPE_STRING ))
163+ }
164+ )
165+
136166 class AccessToken (ApiMixin ):
137167 @staticmethod
138168 def get_request_params_api ():
@@ -171,6 +201,37 @@ def get_request_body_api():
171201 }
172202 )
173203
204+ @staticmethod
205+ def get_response_body_api ():
206+ return openapi .Schema (
207+ type = openapi .TYPE_OBJECT ,
208+ required = [],
209+ properties = {
210+ 'id' : openapi .Schema (type = openapi .TYPE_STRING , title = _ ("Primary key id" ),
211+ description = _ ("Primary key id" )),
212+ 'access_token' : openapi .Schema (type = openapi .TYPE_STRING , title = _ ("Access Token" ),
213+ description = _ ("Access Token" )),
214+ 'access_token_reset' : openapi .Schema (type = openapi .TYPE_BOOLEAN , title = _ ("Reset Token" ),
215+ description = _ ("Reset Token" )),
216+
217+ 'is_active' : openapi .Schema (type = openapi .TYPE_BOOLEAN , title = _ ("Is activation" ),
218+ description = _ ("Is activation" )),
219+ 'access_num' : openapi .Schema (type = openapi .TYPE_NUMBER , title = _ ("Number of visits" ),
220+ description = _ ("Number of visits" )),
221+ 'white_active' : openapi .Schema (type = openapi .TYPE_BOOLEAN , title = _ ("Whether to enable whitelist" ),
222+ description = _ ("Whether to enable whitelist" )),
223+ 'white_list' : openapi .Schema (type = openapi .TYPE_ARRAY ,
224+ items = openapi .Schema (type = openapi .TYPE_STRING ), title = _ ("Whitelist" ),
225+ description = _ ("Whitelist" )),
226+ 'show_source' : openapi .Schema (type = openapi .TYPE_BOOLEAN ,
227+ title = _ ("Whether to display knowledge sources" ),
228+ description = _ ("Whether to display knowledge sources" )),
229+ 'language' : openapi .Schema (type = openapi .TYPE_STRING ,
230+ title = _ ("language" ),
231+ description = _ ("language" ))
232+ }
233+ )
234+
174235 class Edit (ApiMixin ):
175236 @staticmethod
176237 def get_request_body_api ():
@@ -367,6 +428,56 @@ def get_request_body_api():
367428 }
368429 )
369430
431+ @staticmethod
432+ def get_response_body_api ():
433+ return openapi .Schema (
434+ type = openapi .TYPE_OBJECT ,
435+ required = ['id' , 'name' , 'desc' , 'model_id' , 'dialogue_number' , 'dataset_setting' , 'model_setting' ,
436+ 'problem_optimization' , 'stt_model_enable' , 'stt_model_enable' , 'tts_type' ,
437+ 'work_flow' ],
438+ properties = {
439+ 'id' : openapi .Schema (type = openapi .TYPE_STRING , title = _ ("Primary key id" ),
440+ description = _ ("Primary key id" )),
441+ 'name' : openapi .Schema (type = openapi .TYPE_STRING , title = _ ("Application Name" ),
442+ description = _ ("Application Name" )),
443+ 'desc' : openapi .Schema (type = openapi .TYPE_STRING , title = _ ("Application Description" ),
444+ description = _ ("Application Description" )),
445+ 'model_id' : openapi .Schema (type = openapi .TYPE_STRING , title = _ ("Model id" ),
446+ description = _ ("Model id" )),
447+ "dialogue_number" : openapi .Schema (type = openapi .TYPE_NUMBER ,
448+ title = _ ("Number of multi-round conversations" ),
449+ description = _ ("Number of multi-round conversations" )),
450+ 'prologue' : openapi .Schema (type = openapi .TYPE_STRING , title = _ ("Opening remarks" ),
451+ description = _ ("Opening remarks" )),
452+ 'dataset_id_list' : openapi .Schema (type = openapi .TYPE_ARRAY ,
453+ items = openapi .Schema (type = openapi .TYPE_STRING ),
454+ title = _ ("List of associated knowledge base IDs" ),
455+ description = _ ("List of associated knowledge base IDs" )),
456+ 'dataset_setting' : ApplicationApi .DatasetSetting .get_request_body_api (),
457+ 'model_setting' : ApplicationApi .ModelSetting .get_request_body_api (),
458+ 'problem_optimization' : openapi .Schema (type = openapi .TYPE_BOOLEAN , title = _ ("Problem Optimization" ),
459+ description = _ ("Problem Optimization" ), default = True ),
460+ 'type' : openapi .Schema (type = openapi .TYPE_STRING , title = _ ("Application Type" ),
461+ description = _ ("Application Type SIMPLE | WORK_FLOW" )),
462+ 'problem_optimization_prompt' : openapi .Schema (type = openapi .TYPE_STRING ,
463+ title = _ ('Question optimization tips' ),
464+ description = _ ("Question optimization tips" ),
465+ default = _ (
466+ "() contains the user's question. Answer the guessed user's question based on the context ({question}) Requirement: Output a complete question and put it in the <data></data> tag" )),
467+ 'tts_model_id' : openapi .Schema (type = openapi .TYPE_STRING , title = _ ("Text-to-speech model ID" ),
468+ description = _ ("Text-to-speech model ID" )),
469+ 'stt_model_id' : openapi .Schema (type = openapi .TYPE_STRING , title = _ ("Speech-to-text model id" ),
470+ description = _ ("Speech-to-text model id" )),
471+ 'stt_model_enable' : openapi .Schema (type = openapi .TYPE_STRING , title = _ ("Is speech-to-text enabled" ),
472+ description = _ ("Is speech-to-text enabled" )),
473+ 'tts_model_enable' : openapi .Schema (type = openapi .TYPE_STRING , title = _ ("Is text-to-speech enabled" ),
474+ description = _ ("Is text-to-speech enabled" )),
475+ 'tts_type' : openapi .Schema (type = openapi .TYPE_STRING , title = _ ("Text-to-speech type" ),
476+ description = _ ("Text-to-speech type" )),
477+ 'work_flow' : ApplicationApi .WorkFlow .get_request_body_api (),
478+ }
479+ )
480+
370481 class Query (ApiMixin ):
371482 @staticmethod
372483 def get_request_params_api ():
0 commit comments