|
@@ -638,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(), chatReq.getModelType());
|
|
|
+ String dataJson = buildBigModelReqForChat(sessionId, historyDates, ipAddr, isStrong, chatReq.getTopP(), chatReq.getTemperature(), tools, useRag, extraStr, chatReq.getPrompt(), chatReq.getModelType(), chatReq.getOnlineSearch());
|
|
|
log.info("******请求大模型的问答参数为{}", dataJson);
|
|
|
PredictionsRequest request = PredictionsRequest.newBuilder()
|
|
|
.setModelName("slibra_bot")
|
|
@@ -836,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, int modelType) {
|
|
|
+ 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, Boolean onlineSearch) {
|
|
|
ChatRequest chatRequest = new ChatRequest();
|
|
|
chatRequest.setSessionId(sessionId);
|
|
|
chatRequest.setHistoryDia(historyDates);
|
|
@@ -861,6 +861,8 @@ public class GRPCController extends BaseController {
|
|
|
chatRequest.setPrompt(StringUtils.isBlank(prompt) ? DEFAULT_PROMPT : prompt);
|
|
|
//2025年02月24日11:41:38 新增的 区分模型的
|
|
|
chatRequest.setModelType(modelType);
|
|
|
+ //2025年02月27日10:58:16 新增的 是否使用在线搜索
|
|
|
+ chatRequest.setOnlineSearch(onlineSearch);
|
|
|
return JSON.toJSONString(chatRequest);
|
|
|
}
|
|
|
|