mirror of
https://gitee.com/hhyykk/ipms-sjy.git
synced 2025-02-08 14:44:57 +08:00
修改测试名称
This commit is contained in:
parent
9476a05949
commit
c8a2c8369f
@ -1,11 +1,11 @@
|
|||||||
package cn.iocoder.yudao.framework.ai.midjourney;
|
package cn.iocoder.yudao.framework.ai.midjourney;
|
||||||
|
|
||||||
import cn.hutool.core.io.FileUtil;
|
import cn.hutool.core.io.FileUtil;
|
||||||
import cn.iocoder.yudao.framework.ai.midjourney.interactions.MidjourneyInteractions;
|
import cn.iocoder.yudao.framework.ai.midjourney.api.MidjourneyInteractionsApi;
|
||||||
import cn.iocoder.yudao.framework.ai.midjourney.vo.Attachments;
|
import cn.iocoder.yudao.framework.ai.midjourney.api.req.AttachmentsReq;
|
||||||
import cn.iocoder.yudao.framework.ai.midjourney.vo.Describe;
|
import cn.iocoder.yudao.framework.ai.midjourney.api.req.DescribeReq;
|
||||||
import cn.iocoder.yudao.framework.ai.midjourney.vo.ReRoll;
|
import cn.iocoder.yudao.framework.ai.midjourney.api.req.ReRollReq;
|
||||||
import cn.iocoder.yudao.framework.ai.midjourney.vo.UploadAttachmentsRes;
|
import cn.iocoder.yudao.framework.ai.midjourney.api.res.UploadAttachmentsRes;
|
||||||
import com.alibaba.fastjson.JSON;
|
import com.alibaba.fastjson.JSON;
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
@ -38,24 +38,24 @@ public class MidjourneyInteractionsTests {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void mjImageTest() {
|
public void mjImageTest() {
|
||||||
MidjourneyInteractions mjImagineInteractions = new MidjourneyInteractions(midjourneyConfig);
|
MidjourneyInteractionsApi mjImagineInteractions = new MidjourneyInteractionsApi(midjourneyConfig);
|
||||||
mjImagineInteractions.imagine("童话里应该是什么样子?");
|
mjImagineInteractions.imagine("童话里应该是什么样子?");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void reRollTest() {
|
public void reRollTest() {
|
||||||
MidjourneyInteractions mjImagineInteractions = new MidjourneyInteractions(midjourneyConfig);
|
MidjourneyInteractionsApi mjImagineInteractions = new MidjourneyInteractionsApi(midjourneyConfig);
|
||||||
mjImagineInteractions.reRoll(new ReRoll()
|
mjImagineInteractions.reRoll(new ReRollReq()
|
||||||
.setMessageId("1226165117448753243")
|
.setMessageId("1226165117448753243")
|
||||||
.setCustomId("MJ::JOB::upsample::3::2aeefbef-43e2-4057-bcf1-43b5f39ab6f7"));
|
.setCustomId("MJ::JOB::upsample::3::2aeefbef-43e2-4057-bcf1-43b5f39ab6f7"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void uploadAttachmentsTest() {
|
public void uploadAttachmentsTest() {
|
||||||
MidjourneyInteractions mjImagineInteractions = new MidjourneyInteractions(midjourneyConfig);
|
MidjourneyInteractionsApi mjImagineInteractions = new MidjourneyInteractionsApi(midjourneyConfig);
|
||||||
UploadAttachmentsRes res = mjImagineInteractions.uploadAttachments(
|
UploadAttachmentsRes res = mjImagineInteractions.uploadAttachments(
|
||||||
new Attachments().setFileSystemResource(
|
new AttachmentsReq().setFileSystemResource(
|
||||||
new FileSystemResource(new File("/Users/fansili/Downloads/DSC01402.JPG")))
|
new FileSystemResource(new File("/Users/fansili/Downloads/DSC01402.JPG")))
|
||||||
);
|
);
|
||||||
System.err.println(JSON.toJSONString(res));
|
System.err.println(JSON.toJSONString(res));
|
||||||
@ -63,8 +63,8 @@ public class MidjourneyInteractionsTests {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void describeTest() {
|
public void describeTest() {
|
||||||
MidjourneyInteractions mjImagineInteractions = new MidjourneyInteractions(midjourneyConfig);
|
MidjourneyInteractionsApi mjImagineInteractions = new MidjourneyInteractionsApi(midjourneyConfig);
|
||||||
mjImagineInteractions.describe(new Describe()
|
mjImagineInteractions.describe(new DescribeReq()
|
||||||
.setFileName("DSC01402.JPG")
|
.setFileName("DSC01402.JPG")
|
||||||
.setFinalFileName("16826931-2873-45ec-8cfb-0ad81f1a075f/DSC01402.JPG")
|
.setFinalFileName("16826931-2873-45ec-8cfb-0ad81f1a075f/DSC01402.JPG")
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user