From fab3ebc886eae0473c78d979024a0d9f2b7d3ade Mon Sep 17 00:00:00 2001 From: 0007 <0007@qq.com> Date: Wed, 27 Aug 2025 19:59:12 +0800 Subject: [PATCH] Add File --- .../image/test/QianfanImageModelTest.java | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 agents-flex-image/agents-flex-image-qianfan/src/test/java/com/agentsflex/image/test/QianfanImageModelTest.java 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); + } +}