|
|
@@ -1,7 +1,6 @@
|
|
|
package com.cyksj.web.controller.mirror;
|
|
|
|
|
|
import cn.hutool.core.date.DateTime;
|
|
|
-import cn.hutool.core.date.DateUtil;
|
|
|
import cn.hutool.core.util.RandomUtil;
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
import cn.hutool.json.JSONObject;
|
|
|
@@ -17,8 +16,6 @@ import com.cyksj.mapper.GroupsMapper;
|
|
|
import com.cyksj.mapper.GroupsRelationMapper;
|
|
|
import com.cyksj.mapper.renew.RenewUpgradePackageMapper;
|
|
|
import com.cyksj.model.entity.*;
|
|
|
-import com.cyksj.model.request.gpt.ConversationRequest;
|
|
|
-import com.cyksj.model.response.ConversationLimitResponse;
|
|
|
import com.cyksj.model.views.*;
|
|
|
import com.cyksj.service.chatgpt.ChatGptAccountService;
|
|
|
import com.cyksj.service.claude.ClaudeService;
|
|
|
@@ -32,7 +29,6 @@ import com.ejlchina.searcher.util.MapBuilder;
|
|
|
import com.ejlchina.searcher.util.MapUtils;
|
|
|
import lombok.RequiredArgsConstructor;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
-import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
@@ -41,7 +37,6 @@ import javax.servlet.http.HttpServletRequest;
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
import java.io.IOException;
|
|
|
import java.time.LocalDateTime;
|
|
|
-import java.util.Date;
|
|
|
import java.util.List;
|
|
|
|
|
|
/**
|
|
|
@@ -256,6 +251,16 @@ public class MirrorController {
|
|
|
return GatewayResponse.SUCCESS.newBuilder().toResult(search);
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * GPT切换模式
|
|
|
+ */
|
|
|
+ @PutMapping("/gpt/switch/model/{relationId}")
|
|
|
+ public Result<String> gptSwitchModel(@PathVariable Long relationId) {
|
|
|
+ long userId = StpUserUtil.getLoginIdAsLong();
|
|
|
+ chatGptAccountService.gptSwitchModel(userId, relationId);
|
|
|
+ return GatewayResponse.SUCCESS.newBuilder().toResult();
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
|
|
|
/**
|