Bläddra i källkod

新增大模型调用

wangmiaomiao 11 månader sedan
förälder
incheckning
2325e89a94

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 79 - 0
slibra-admin/src/main/java/com/slibra/web/controller/business/GRPCController.java


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

@@ -75,7 +75,7 @@ public class WarningController extends BaseController {
         Date currentDate = Date.from(localDateTime.atZone(ZoneId.systemDefault()).toInstant());
         //获取对个格式日期字符串
         String currentDateStr = DateUtil.format(currentDate, DateUtils.YYYYMMDD_TS);
-        currentDateStr = "2024/03/01T ";
+        currentDateStr = "2024/03/01";
         String currentHourStr = DateUtil.format(currentDate, DateUtils.YYYYMMDDHH_TS);
         currentHourStr = "2024/05/05 11";
         //查询工业库 日报库 机器人化验库

+ 6 - 5
slibra-admin/src/main/java/org/pytorch/serve/grpc/inference/Test.java

@@ -16,7 +16,7 @@ import java.util.Iterator;
 
 public class Test {
 
-/*    public static void main(String[] args) throws InvalidProtocolBufferException, UnsupportedEncodingException {
+    public static void main(String[] args) throws InvalidProtocolBufferException, UnsupportedEncodingException {
         ManagedChannel channel = ManagedChannelBuilder.forAddress("10.0.0.24", 17070)
                 .usePlaintext()
                 .build();
@@ -36,17 +36,18 @@ public class Test {
         Iterator<PredictionResponse> response = stub.streamPredictions(request);
         while (response.hasNext()){
             String responseStr = response.next().toString();
-            System.out.println(unicodeToChinese(responseStr.substring(16, responseStr.length()-1)) + "---" + responseStr);
+//            System.out.println(unicodeToChinese(responseStr.substring(16, responseStr.length()-1)) + "---" + responseStr);
+            System.out.println(responseStr);
         }
         channel.shutdown();
-    }*/
+    }
 
 
-    public static void main(String[] args) {
+   /* public static void main(String[] args) {
         String str = "---prediction: \"\\346\\210\\221\"";
         String substring = str.substring(16, str.length() - 1);
         System.out.println(unicodeToChinese(substring));
-    }
+    }*/
 
     // 将 Unicode 编码的字符串转换为中文 (返回的结果里没有u 不是常规的Unicode编码)
     // 将 Unicode 编码的字符串转换为中文

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 20 - 0
slibra-admin/src/main/java/org/pytorch/serve/grpc/inference/TestJC.java


Vissa filer visades inte eftersom för många filer har ändrats