diff --git a/src/api/ai/image/index.ts b/src/api/ai/image/index.ts
index 99419316..ffc5a091 100644
--- a/src/api/ai/image/index.ts
+++ b/src/api/ai/image/index.ts
@@ -23,6 +23,14 @@ export interface ImagePageReqVO {
pageSize: number // 分页大小
}
+export interface ImageDallReqVO {
+ prompt: string // 提示词
+ model: string // 模型
+ style: string // 图像生成的风格
+ width: string // 图片宽度
+ height: string // 图片高度
+}
+
export interface ImageDallReqVO {
prompt: string // 提示词
model: string // 模型
@@ -30,6 +38,12 @@ export interface ImageDallReqVO {
size: string // size不能为空
}
+export interface ImageMidjourneyImagineReqVO {
+ prompt: string // 提示词
+ base64Array: string[] // size不能为空
+}
+
+
// AI API 密钥 API
export const ImageApi = {
// 获取 image 列表
@@ -44,8 +58,12 @@ export const ImageApi = {
dall: async (data: ImageDallReqVO)=> {
return await request.post({ url: `/ai/image/dall`, data })
},
+ // midjourney - imagine
+ midjourneyImagine: async (data: ImageMidjourneyImagineReqVO)=> {
+ return await request.post({ url: `/ai/image/midjourney/imagine`, data })
+ },
// 删除
deleteImage: async (id: number)=> {
- return await request.delete({ url: `/ai/image/delete-my?id=${id}`})
+ return await request.delete({ url: `/ai/image/delete-id-my?id=${id}`})
},
}
diff --git a/src/views/ai/image/midjourney/index.vue b/src/views/ai/image/midjourney/index.vue
index 114a1467..b0569981 100644
--- a/src/views/ai/image/midjourney/index.vue
+++ b/src/views/ai/image/midjourney/index.vue
@@ -74,6 +74,11 @@