Ver código fonte

不传入options 参数,就先不builder

cherishsince 1 ano atrás
pai
commit
633b112603

+ 2 - 2
yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/image/ImageClient.java

@@ -24,9 +24,9 @@ public interface ImageClient extends ModelClient<ImagePrompt, ImageResponse> {
 
 	/**
 	 * 跟 chat一样
-	 * @param request the request object to be sent to the AI model
+	 * @param imagePrompt the request object to be sent to the AI model
 	 * @return
 	 */
-	ImageResponse call(ImagePrompt request);
+	ImageResponse call(ImagePrompt imagePrompt);
 
 }

+ 2 - 1
yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/image/ImagePrompt.java

@@ -49,7 +49,8 @@ public class ImagePrompt implements ModelRequest<List<ImageMessage>> {
 	}
 
 	public ImagePrompt(String instructions) {
-		this(new ImageMessage(instructions), ImageOptionsBuilder.builder().build());
+//		this(new ImageMessage(instructions), ImageOptionsBuilder.builder().build());
+		this(new ImageMessage(instructions), null);
 	}
 
 	@Override