|
@@ -42,8 +42,6 @@ import java.util.*;
|
|
|
|
|
|
import static com.slibra.common.constant.MyConstants.*;
|
|
|
import static com.slibra.common.enums.BusinessEnum.BigModelBizEnum.DECISION_REPORT;
|
|
|
-import static com.slibra.common.enums.BusinessEnum.WarningCategoryEnum.*;
|
|
|
-import static com.slibra.common.enums.BusinessEnum.WarningCategoryEnum.CS_ZL;
|
|
|
|
|
|
/**
|
|
|
* 告警相关
|
|
@@ -640,7 +638,7 @@ public class GRPCController extends BaseController {
|
|
|
// else
|
|
|
// tools = tools;
|
|
|
// }
|
|
|
- String dataJson = buildBigModelReqForChat(sessionId, historyDates, ipAddr, isStrong, chatReq.getTopP(), chatReq.getTemperature(), tools, useRag, extraStr, chatReq.getPrompt());
|
|
|
+ String dataJson = buildBigModelReqForChat(sessionId, historyDates, ipAddr, isStrong, chatReq.getTopP(), chatReq.getTemperature(), tools, useRag, extraStr, chatReq.getPrompt(), chatReq.getModelType());
|
|
|
log.info("******请求大模型的问答参数为{}", dataJson);
|
|
|
PredictionsRequest request = PredictionsRequest.newBuilder()
|
|
|
.setModelName("slibra_bot")
|
|
@@ -838,7 +836,7 @@ public class GRPCController extends BaseController {
|
|
|
return JSON.toJSONString(map);
|
|
|
}
|
|
|
|
|
|
- private String buildBigModelReqForChat(String sessionId, List<String> historyDates, String ipAddr, int isStrong, Double topP, Double temperature, String tools, boolean useRag, String extraStr, String prompt) {
|
|
|
+ private String buildBigModelReqForChat(String sessionId, List<String> historyDates, String ipAddr, int isStrong, Double topP, Double temperature, String tools, boolean useRag, String extraStr, String prompt, int modelType) {
|
|
|
ChatRequest chatRequest = new ChatRequest();
|
|
|
chatRequest.setSessionId(sessionId);
|
|
|
chatRequest.setHistoryDia(historyDates);
|
|
@@ -861,6 +859,8 @@ public class GRPCController extends BaseController {
|
|
|
chatRequest.setUseRag(false);
|
|
|
//2024年08月11日16:04:21 允许用户自定义prompt
|
|
|
chatRequest.setPrompt(StringUtils.isBlank(prompt) ? DEFAULT_PROMPT : prompt);
|
|
|
+ //2025年02月24日11:41:38 新增的 区分模型的
|
|
|
+ chatRequest.setModelType(modelType);
|
|
|
return JSON.toJSONString(chatRequest);
|
|
|
}
|
|
|
|