|
@@ -28,6 +28,7 @@ import lombok.extern.slf4j.Slf4j;
|
|
|
import org.pytorch.serve.grpc.inference.InferenceAPIsServiceGrpc;
|
|
|
import org.pytorch.serve.grpc.inference.PredictionResponse;
|
|
|
import org.pytorch.serve.grpc.inference.PredictionsRequest;
|
|
|
+import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.util.CollectionUtils;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
@@ -527,12 +528,12 @@ public class GRPCController extends BaseController {
|
|
|
|
|
|
}else{//自定义工单
|
|
|
chatReq.setShowVal(GONGDAN_TITLE_CUSTOM.replace("#{0}", timeBegin).replace("#{1}", timeEnd));//处理展示的标题
|
|
|
- /*WorkOrderReq workOrderReq = new WorkOrderReq();
|
|
|
+ WorkOrderReq workOrderReq = new WorkOrderReq();
|
|
|
BeanUtils.copyProperties(chatReq, workOrderReq);
|
|
|
//拿到数据
|
|
|
List<WorkOrderRes> workOrderRes = frontService.customWorkOrder(workOrderReq);
|
|
|
- //品种prompt
|
|
|
- String question = this.buildGDQuestionCustom(workOrderRes, workOrderReq);
|
|
|
+ //拼接prompt
|
|
|
+ /*String question = this.buildGDQuestionCustom(workOrderRes, workOrderReq);
|
|
|
//2024年6月23日17:21:58 判断问题的长度,如果长度大于配置的值(5000),提示一句话
|
|
|
if(question.length() > MAX_QUESTION_LENGTH){
|
|
|
log.info("*************自定义工单超长了,组装完的参数为{}", question);
|
|
@@ -550,7 +551,7 @@ public class GRPCController extends BaseController {
|
|
|
chatReq.setQuestion(MODULE_CONTENT_CUSTOM);
|
|
|
extraStr = buildGDCustomQuestion(timeBegin, timeEnd, chatReq.getWhichWay());
|
|
|
//2024年6月20日16:48:08 如果是自定义工单,需要处理图表 放到remark中
|
|
|
-// chatReq.setRemark(JSON.toJSONString(frontService.customWorkOrderHandleByData(workOrderReq, workOrderRes), JSONWriter.Feature.WriteNulls));
|
|
|
+ chatReq.setRemark(JSON.toJSONString(frontService.customWorkOrderHandleByData(workOrderReq, workOrderRes), JSONWriter.Feature.WriteNulls));
|
|
|
}
|
|
|
isStrong = 0;//2024年7月29日14:15:47 工单不走文心一言了
|
|
|
useRag = false;
|