File tree Expand file tree Collapse file tree 2 files changed +19
-2
lines changed
image/index/components/other Expand file tree Collapse file tree 2 files changed +19
-2
lines changed Original file line number Diff line number Diff line change 61
61
</el-select >
62
62
</el-space >
63
63
</div >
64
- <div class =" group-item" >
64
+ <div class =" group-item" v-if = " otherPlatform !== AiPlatformEnum.CHATGLM " >
65
65
<div >
66
66
<el-text tag =" b" >图片尺寸</el-text >
67
67
</div >
79
79
<script setup lang="ts">
80
80
import {ImageApi , ImageDrawReqVO , ImageVO } from ' @/api/ai/image'
81
81
import {
82
- AiPlatformEnum ,
82
+ AiPlatformEnum , ChatGlmModels ,
83
83
ImageHotWords ,
84
84
ImageModelVO ,
85
85
OtherPlatformEnum ,
@@ -159,6 +159,11 @@ const handlerPlatformChange = async (platform) => {
159
159
models .value = TongYiWanXiangModels
160
160
} else if (AiPlatformEnum .YI_YAN === platform ) {
161
161
models .value = QianFanModels
162
+ } else if (AiPlatformEnum .CHATGLM === platform ) {
163
+ models .value = ChatGlmModels
164
+ // ChatGlm 模型没有 width、height 随便默认一个值过后台必填检测
165
+ height .value = 512
166
+ width .value = 512
162
167
} else {
163
168
models .value = []
164
169
}
Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ export const AiPlatformEnum = {
21
21
STABLE_DIFFUSION : 'StableDiffusion' , // Stability AI
22
22
MIDJOURNEY : 'Midjourney' , // Midjourney
23
23
SUNO : 'Suno' , // Suno AI
24
+ CHATGLM : 'ChatGlm' , // ChatGlm
24
25
}
25
26
26
27
export const OtherPlatformEnum :ImageModelVO [ ] = [
@@ -31,6 +32,10 @@ export const OtherPlatformEnum:ImageModelVO [] = [
31
32
{
32
33
key : AiPlatformEnum . YI_YAN ,
33
34
name : '百度千帆'
35
+ } ,
36
+ {
37
+ key : AiPlatformEnum . CHATGLM ,
38
+ name : '智铺 ChatGlm'
34
39
}
35
40
]
36
41
@@ -266,6 +271,13 @@ export const QianFanModels: ImageModelVO[] = [
266
271
}
267
272
]
268
273
274
+ export const ChatGlmModels : ImageModelVO [ ] = [
275
+ {
276
+ key : 'cogview-3' ,
277
+ name : 'cogview-3'
278
+ }
279
+ ]
280
+
269
281
270
282
export const StableDiffusionClipGuidancePresets : ImageModelVO [ ] = [
271
283
{
You can’t perform that action at this time.
0 commit comments