@@ -48,7 +48,8 @@ def get_request_body_api():
4848 'chat_id' : openapi .Schema (type = openapi .TYPE_STRING , title = _ ("Conversation ID" )),
4949 're_chat' : openapi .Schema (type = openapi .TYPE_BOOLEAN , title = _ ("regenerate" ),
5050 default = False ),
51- 'stream' : openapi .Schema (type = openapi .TYPE_BOOLEAN , title = _ ("Stream Output" ), default = True )
51+ 'stream' : openapi .Schema (type = openapi .TYPE_BOOLEAN , title = _ ("Stream Output" ),
52+ default = True )
5253
5354 })
5455
@@ -62,7 +63,66 @@ def get_request_body_api():
6263 properties = {
6364 'message' : openapi .Schema (type = openapi .TYPE_STRING , title = _ ("problem" ), description = _ ("problem" )),
6465 're_chat' : openapi .Schema (type = openapi .TYPE_BOOLEAN , title = _ ("regenerate" ), default = False ),
65- 'stream' : openapi .Schema (type = openapi .TYPE_BOOLEAN , title = _ ("Is it streaming output" ), default = True )
66+ 'stream' : openapi .Schema (type = openapi .TYPE_BOOLEAN , title = _ ("Is it streaming output" ), default = True ),
67+
68+ 'form_data' : openapi .Schema (type = openapi .TYPE_OBJECT , title = _ ("Form data" ),
69+ description = _ ("Form data" ),
70+ default = {}),
71+ 'image_list' : openapi .Schema (
72+ type = openapi .TYPE_ARRAY ,
73+ title = _ ("Image list" ),
74+ description = _ ("Image list" ),
75+ items = openapi .Schema (
76+ type = openapi .TYPE_OBJECT ,
77+ properties = {
78+ 'name' : openapi .Schema (type = openapi .TYPE_STRING ,
79+ title = _ ("Image name" )),
80+ 'url' : openapi .Schema (type = openapi .TYPE_STRING ,
81+ title = _ ("Image URL" )),
82+ 'file_id' : openapi .Schema (type = openapi .TYPE_STRING ),
83+ }
84+ ),
85+ default = []
86+ ),
87+ 'document_list' : openapi .Schema (type = openapi .TYPE_ARRAY , title = _ ("Document list" ),
88+ description = _ ("Document list" ),
89+ items = openapi .Schema (
90+ type = openapi .TYPE_OBJECT ,
91+ properties = {
92+ # 定义对象的具体属性
93+ 'name' : openapi .Schema (type = openapi .TYPE_STRING ,
94+ title = _ ("Document name" )),
95+ 'url' : openapi .Schema (type = openapi .TYPE_STRING ,
96+ title = _ ("Document URL" )),
97+ 'file_id' : openapi .Schema (type = openapi .TYPE_STRING ),
98+ }
99+ ),
100+ default = []),
101+ 'audio_list' : openapi .Schema (type = openapi .TYPE_ARRAY , title = _ ("Audio list" ),
102+ description = _ ("Audio list" ),
103+ items = openapi .Schema (
104+ type = openapi .TYPE_OBJECT ,
105+ properties = {
106+ 'name' : openapi .Schema (type = openapi .TYPE_STRING ,
107+ title = _ ("Audio name" )),
108+ 'url' : openapi .Schema (type = openapi .TYPE_STRING ,
109+ title = _ ("Audio URL" )),
110+ 'file_id' : openapi .Schema (type = openapi .TYPE_STRING ),
111+ }
112+ ),
113+ default = []),
114+ 'runtime_node_id' : openapi .Schema (type = openapi .TYPE_STRING , title = _ ("Runtime node id" ),
115+ description = _ ("Runtime node id" ),
116+ default = "" ),
117+ 'node_data' : openapi .Schema (type = openapi .TYPE_OBJECT , title = _ ("Node data" ),
118+ description = _ ("Node data" ),
119+ default = {}),
120+ 'chat_record_id' : openapi .Schema (type = openapi .TYPE_STRING , title = _ ("Conversation record id" ),
121+ description = _ ("Conversation record id" ),
122+ default = "" ),
123+ 'child_node' : openapi .Schema (type = openapi .TYPE_STRING , title = _ ("Child node" ),
124+ description = _ ("Child node" ),
125+ default = {}),
66126
67127 }
68128 )
@@ -132,17 +192,23 @@ def get_request_body_api():
132192 'problem_optimization' ],
133193 properties = {
134194 'id' : openapi .Schema (type = openapi .TYPE_STRING , title = _ ("Application ID" ),
135- description = _ ("Application ID, pass when modifying, do not pass when creating" )),
136- 'model_id' : openapi .Schema (type = openapi .TYPE_STRING , title = _ ("Model ID" ), description = _ ("Model ID" )),
195+ description = _ (
196+ "Application ID, pass when modifying, do not pass when creating" )),
197+ 'model_id' : openapi .Schema (type = openapi .TYPE_STRING , title = _ ("Model ID" ),
198+ description = _ ("Model ID" )),
137199 'dataset_id_list' : openapi .Schema (type = openapi .TYPE_ARRAY ,
138200 items = openapi .Schema (type = openapi .TYPE_STRING ),
139- title = _ ("List of associated knowledge base IDs" ), description = _ ("List of associated knowledge base IDs" )),
140- 'multiple_rounds_dialogue' : openapi .Schema (type = openapi .TYPE_BOOLEAN , title = _ ("Do you want to initiate multiple sessions" ),
141- description = _ ("Do you want to initiate multiple sessions" )),
201+ title = _ ("List of associated knowledge base IDs" ),
202+ description = _ ("List of associated knowledge base IDs" )),
203+ 'multiple_rounds_dialogue' : openapi .Schema (type = openapi .TYPE_BOOLEAN ,
204+ title = _ ("Do you want to initiate multiple sessions" ),
205+ description = _ (
206+ "Do you want to initiate multiple sessions" )),
142207 'dataset_setting' : ApplicationApi .DatasetSetting .get_request_body_api (),
143208 'model_setting' : ApplicationApi .ModelSetting .get_request_body_api (),
144209 'problem_optimization' : openapi .Schema (type = openapi .TYPE_BOOLEAN , title = _ ("Problem optimization" ),
145- description = _ ("Do you want to enable problem optimization" ), default = True )
210+ description = _ ("Do you want to enable problem optimization" ),
211+ default = True )
146212 }
147213 )
148214
@@ -214,14 +280,19 @@ def get_response_body_api():
214280 description = _ ("Resource ID" ), default = 1 ),
215281 'source_type' : openapi .Schema (type = openapi .TYPE_STRING , title = _ ("Resource Type" ),
216282 description = _ ("Resource Type" ), default = 'xxx' ),
217- 'message_tokens' : openapi .Schema (type = openapi .TYPE_INTEGER , title = _ ("Number of tokens consumed by the question" ),
283+ 'message_tokens' : openapi .Schema (type = openapi .TYPE_INTEGER ,
284+ title = _ ("Number of tokens consumed by the question" ),
218285 description = _ ("Number of tokens consumed by the question" ), default = 0 ),
219- 'answer_tokens' : openapi .Schema (type = openapi .TYPE_INTEGER , title = _ ("The number of tokens consumed by the answer" ),
220- description = _ ("The number of tokens consumed by the answer" ), default = 0 ),
221- 'improve_paragraph_id_list' : openapi .Schema (type = openapi .TYPE_STRING , title = _ ("Improved annotation list" ),
286+ 'answer_tokens' : openapi .Schema (type = openapi .TYPE_INTEGER ,
287+ title = _ ("The number of tokens consumed by the answer" ),
288+ description = _ ("The number of tokens consumed by the answer" ),
289+ default = 0 ),
290+ 'improve_paragraph_id_list' : openapi .Schema (type = openapi .TYPE_STRING ,
291+ title = _ ("Improved annotation list" ),
222292 description = _ ("Improved annotation list" ),
223293 default = []),
224- 'index' : openapi .Schema (type = openapi .TYPE_STRING , title = _ ("Corresponding session Corresponding subscript" ),
294+ 'index' : openapi .Schema (type = openapi .TYPE_STRING ,
295+ title = _ ("Corresponding session Corresponding subscript" ),
225296 description = _ ("Corresponding session id corresponding subscript" ),
226297 default = 0
227298 ),
@@ -380,7 +451,8 @@ def get_response_body_api():
380451 description = _ ("Paragraph content" ), default = _ ('Paragraph content' )),
381452 'title' : openapi .Schema (type = openapi .TYPE_STRING , title = _ ("title" ),
382453 description = _ ("title" ), default = _ ("Description of xxx" )),
383- 'hit_num' : openapi .Schema (type = openapi .TYPE_INTEGER , title = _ ("Number of hits" ), description = _ ("Number of hits" ),
454+ 'hit_num' : openapi .Schema (type = openapi .TYPE_INTEGER , title = _ ("Number of hits" ),
455+ description = _ ("Number of hits" ),
384456 default = 1 ),
385457 'star_num' : openapi .Schema (type = openapi .TYPE_INTEGER , title = _ ("Number of Likes" ),
386458 description = _ ("Number of Likes" ), default = 1 ),
0 commit comments