Selaa lähdekoodia

modify gemini

supeng 2 viikkoa sitten
vanhempi
commit
e6dabb1cea

+ 2 - 2
content-understanding-core/src/main/java/com/tzld/piaoquan/content/understanding/service/impl/GeminiGenerateContentAction.java

@@ -41,7 +41,7 @@ public class GeminiGenerateContentAction implements Action {
     private static final String MODEL = "gemini-2.0-flash";
     private static final Double TEMPERATURE = 1.0;
 
-    private static final Integer RETRY_TIMES = 10;
+    private static final Integer RETRY_TIMES = 3;
 
     @Autowired
     private RedisUtil redisUtil;
@@ -114,7 +114,7 @@ public class GeminiGenerateContentAction implements Action {
                 }
                 throw new RuntimeException("geminiGenerateContentAction request error", e);
             }
-        }, RETRY_TIMES, "geminiGenerateContentAction", RetryUtil::retryIntervalLevel1);
+        }, RETRY_TIMES, "geminiGenerateContentAction", RetryUtil::retryInterval);
     }
 
     private int getIndex(int size) {

+ 9 - 8
content-understanding-core/src/main/java/com/tzld/piaoquan/content/understanding/service/impl/PipelineServiceImpl.java

@@ -289,14 +289,15 @@ public class PipelineServiceImpl implements PipelineService {
             Integer type = currentNode.getType();
             String input = currentNode.getInput() == null ? "" : currentNode.getInput();
             String reason = "处理失败";
-            String result = null;
-            try {
-                // 执行action
-                result = executeTaskStep(step, input, type);
-            } catch (Exception e) {
-                reason = e.getMessage();
-                log.error("step execute error step = {}, reason = {}", e, JSON.toJSONString(step), reason);
-            }
+//            String result = null;
+//            try {
+//                // 执行action
+//                result = executeTaskStep(step, input, type);
+//            } catch (Exception e) {
+//                reason = e.getMessage();
+//                log.error("step execute error step = {}, reason = {}", e, JSON.toJSONString(step), reason);
+//            }
+            String result = executeTaskStep(step, input, type);
             if (Objects.isNull(currentNode.getChildren()) || currentNode.getChildren().isEmpty()) {
                 if (Objects.nonNull(result)) {
                     //异常不阻塞其他分支执行