|
|
@@ -140,5 +140,17 @@ public class CmsGptCarController {
|
|
|
return GatewayResponse.SUCCESS.newBuilder().toResult();
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+ /**
|
|
|
+ * 刷新gpt得officialSession
|
|
|
+ */
|
|
|
+ @PutMapping("/flush/officialSession/{id}")
|
|
|
+ public Result<String> flushOfficialSession(@PathVariable Long id) {
|
|
|
+ ChatgptSession dbChatSession = chatgptSessionMapper.selectById(id);
|
|
|
+ if (dbChatSession != null) {
|
|
|
+ String gptSession = chatGptAccountService.getGptSession(dbChatSession.getEmail(), dbChatSession.getPassword());
|
|
|
+ dbChatSession.setOfficialSession(gptSession);
|
|
|
+ chatgptSessionMapper.updateById(dbChatSession);
|
|
|
+ }
|
|
|
+ return GatewayResponse.SUCCESS.newBuilder().toResult();
|
|
|
+ }
|
|
|
}
|