Ver código fonte

修复不过

wangmiaomiao 10 meses atrás
pai
commit
0750704f47

+ 1 - 1
slibra-admin/src/main/java/com/slibra/web/controller/business/GRPCController.java

@@ -259,7 +259,7 @@ public class GRPCController extends BaseController {
                     .usePlaintext()
                     .build();
             InferenceAPIsServiceGrpc.InferenceAPIsServiceBlockingStub stub = InferenceAPIsServiceGrpc.newBlockingStub(channel);
-            String dataJson = "{\"bot_id\":\"721\",\"exp_id\":\"721\",\"session_id\":\"" + sessionId + "\",\"use_rag\":\"true\",\"prompt\":\"你是⼀个资深⽔务领域专家,能回答各种⽔务相关问题\",\"history_dia\":" + JSON.toJSONString(historyDates) + ",\"generate_args\":{\"max_new_tokens\":2048,\"max_length\":4096,\"num_beams\":1,\"do_sample\":true,\"top_p\":0.7,\"temperature\":0.95},\"extra\":{ \"ip_address\": " + ipAddr  + " },\"strengthen\":" + (isStrong == 1) + "}";
+            String dataJson = "{\"bot_id\":\"721\",\"exp_id\":\"721\",\"session_id\":\"" + sessionId + "\",\"use_rag\":\"true\",\"prompt\":\"你是⼀个资深⽔务领域专家,能回答各种⽔务相关问题\",\"history_dia\":" + JSON.toJSONString(historyDates) + ",\"generate_args\":{\"max_new_tokens\":2048,\"max_length\":4096,\"num_beams\":1,\"do_sample\":true,\"top_p\":0.7,\"temperature\":0.95},\"extra\":{ \"ip_address\": \"" + ipAddr  + "\" },\"strengthen\":" + (isStrong == 1) + "}";
             log.info("请求大模型的问答参数为{}", dataJson);
             PredictionsRequest request = PredictionsRequest.newBuilder()
                     .setModelName("slibra_bot")

+ 2 - 2
slibra-system/src/main/java/com/slibra/business/service/impl/FrontServiceImpl.java

@@ -79,9 +79,9 @@ public class FrontServiceImpl implements IFrontService {
         if(count > 0)//2024年5月26日19:01:39  有告警记录再返回
             result.add(WARNING_TEMPLATE.replace("#", String.valueOf(count)));
         //获取报警警的统计数量
+        count = this.xinyiWarningRecordMapper.getWarningCountByType(2);
         if(count > 0)//2024年5月26日19:01:39  有告警记录再返回
-            count = this.xinyiWarningRecordMapper.getWarningCountByType(2);
-        result.add(FORECAST_WARNING_TEMPLATE.replace("#", String.valueOf(count)));
+            result.add(FORECAST_WARNING_TEMPLATE.replace("#", String.valueOf(count)));
         return result;
     }