diff --git a/agents-flex-image/agents-flex-image-qianfan/src/test/java/com/agentsflex/image/test/QianfanImageModelTest.java b/agents-flex-image/agents-flex-image-qianfan/src/test/java/com/agentsflex/image/test/QianfanImageModelTest.java new file mode 100644 index 0000000..4edfce2 --- /dev/null +++ b/agents-flex-image/agents-flex-image-qianfan/src/test/java/com/agentsflex/image/test/QianfanImageModelTest.java @@ -0,0 +1,22 @@ +package com.agentsflex.image.test; + +import com.agentsflex.core.image.GenerateImageRequest; +import com.agentsflex.core.image.ImageResponse; +import com.agentsflex.image.qianfan.QianfanImageModel; +import com.agentsflex.image.qianfan.QianfanImageModelConfig; +import org.junit.Test; + +public class QianfanImageModelTest { + + @Test + public void testGenerate() throws InterruptedException { + QianfanImageModelConfig config = new QianfanImageModelConfig(); + config.setApiKey("*************"); + QianfanImageModel imageModel = new QianfanImageModel(config); + + GenerateImageRequest request = new GenerateImageRequest(); + request.setPrompt("画一个职场性感女生图片"); + ImageResponse generate = imageModel.generate(request); + System.out.println(generate); + } +}