supeng 21 uur geleden
bovenliggende
commit
f646e4cb9c

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

@@ -43,9 +43,9 @@ public class GeminiGenerateContentAction implements Action {
     @Override
     public String execute(ActionParam param) {
         Integer type = param.getType();
-        ThreadLocalRandom random = ThreadLocalRandom.current();
-        int index = random.nextInt(apiKeyList.size());
-        String apiKey = apiKeyList.get(index);
+//        ThreadLocalRandom random = ThreadLocalRandom.current();
+//        int index = random.nextInt(apiKeyList.size());
+//        String apiKey = apiKeyList.get(index);
         GeminiParam geminiParam = new GeminiParam();
         geminiParam.setType(type);
         geminiParam.setPrompt(param.getPrompt());
@@ -54,7 +54,7 @@ public class GeminiGenerateContentAction implements Action {
                 || Objects.equals(ContentTypeEnum.VTT.getValue(), type)) {
             geminiParam.setMediaUrl(param.getInput());
         }
-        geminiParam.setApiKey(apiKey);
+//        geminiParam.setApiKey(apiKey);
         geminiParam.setModel(MODEL);
         geminiParam.setTemperature(TEMPERATURE);
         return RetryUtil.executeWithRetry(() -> {