@@ -150,7 +150,7 @@ def post(self, request: Request, chat_id: str):
150150 operation_id = _ ("Get the conversation list" ),
151151 manual_parameters = ChatApi .get_request_params_api (),
152152 responses = result .get_api_array_response (ChatApi .get_response_body_api ()),
153- tags = [_ ("Application/Conversation Log" )]
153+ tags = [_ ("Application/Conversation Log" )]
154154 )
155155 @has_permissions (
156156 ViewPermission ([RoleConstants .ADMIN , RoleConstants .USER , RoleConstants .APPLICATION_KEY ],
@@ -222,6 +222,23 @@ def delete(self, request: Request, application_id: str, chat_id: str):
222222 data = {'application_id' : application_id , 'user_id' : request .user .id ,
223223 'chat_id' : chat_id }).logic_delete ())
224224
225+ @action (methods = ['PUT' ], detail = False )
226+ @swagger_auto_schema (operation_summary = _ ("Client modifies dialogue summary" ),
227+ operation_id = _ ("Client modifies dialogue summary" ),
228+ request_body = ChatClientHistoryApi .Operate .ReAbstract .get_request_body_api (),
229+ tags = [_ ("Application/Conversation Log" )])
230+ @has_permissions (ViewPermission (
231+ [RoleConstants .APPLICATION_ACCESS_TOKEN ],
232+ [lambda r , keywords : Permission (group = Group .APPLICATION , operate = Operate .USE ,
233+ dynamic_tag = keywords .get ('application_id' ))],
234+ compare = CompareConstants .AND ),
235+ compare = CompareConstants .AND )
236+ def put (self , request : Request , application_id : str , chat_id : str ):
237+ return result .success (
238+ ChatSerializers .Operate (
239+ data = {'application_id' : application_id , 'user_id' : request .user .id ,
240+ 'chat_id' : chat_id }).re_abstract (request .data ))
241+
225242 class Page (APIView ):
226243 authentication_classes = [TokenAuth ]
227244
0 commit comments