diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/util/MjUtil.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/util/MjUtil.java index bc7ee5504..e119b100f 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/util/MjUtil.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/midjourney/util/MjUtil.java @@ -7,6 +7,8 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; /** + * mj util + * * author: fansili * time: 2024/4/6 19:00 */ @@ -57,12 +59,4 @@ public class MjUtil { return mjContent; } - public static void main(String[] args) { - String content1 = "**南极应该是什么样子? --v 6.0 --style raw** - <@972721304891453450> (32%) (fast, stealth)"; - String content2 = "**南极应该是什么样子? --v 6.0 --style raw** - <@972721304891453450> (fast, stealth)"; - - System.err.println(parseContent(content1));; - System.err.println(parseContent(content2));; - } - } diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/mj/MjUtilTests.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/mj/MjUtilTests.java new file mode 100644 index 000000000..521e9b5ab --- /dev/null +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/mj/MjUtilTests.java @@ -0,0 +1,22 @@ +package cn.iocoder.yudao.framework.ai.mj; + +import cn.iocoder.yudao.framework.ai.midjourney.util.MjUtil; +import org.junit.Test; + +/** + * mj util + * + * author: fansili + * time: 2024/4/6 21:57 + */ +public class MjUtilTests { + + @Test + public void parseContentTest() { + String content1 = "**南极应该是什么样子? --v 6.0 --style raw** - <@972721304891453450> (32%) (fast, stealth)"; + String content2 = "**南极应该是什么样子? --v 6.0 --style raw** - <@972721304891453450> (fast, stealth)"; + + System.err.println(MjUtil.parseContent(content1)); + System.err.println(MjUtil.parseContent(content2)); + } +}